[CRIU] [PATCH 1/2] zdtm: fix decode_flav()
Adrian Reber
adrian at lisas.de
Thu Mar 16 09:38:17 PDT 2017
From: Adrian Reber <areber at redhat.com>
decode_flav() was doing 'if i in flavors:' where 'i' was an integer but
the keys from the flavors dict are strings 'h', 'ns' and 'uns'.
Signed-off-by: Adrian Reber <areber at redhat.com>
---
test/zdtm.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/zdtm.py b/test/zdtm.py
index e88de05..b04b779 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -291,10 +291,10 @@ def encode_flav(f):
def decode_flav(i):
- i = i - 128
- if i in flavors:
+ try:
return flavors.keys()[i - 128]
- return "unknown"
+ except:
+ return "unknown"
def tail(path):
--
2.9.3
More information about the CRIU
mailing list