[CRIU] [PATCH] zdtm: handle unknown flavors

Andrey Vagin avagin at openvz.org
Fri Apr 29 17:59:19 PDT 2016


From: Andrew Vagin <avagin at virtuozzo.com>

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 test/zdtm.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index c9f8d14..b1ed38d 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -246,7 +246,10 @@ def encode_flav(f):
 	return (flavors.keys().index(f) + 128)
 
 def decode_flav(i):
-	return flavors.keys()[i - 128]
+        i = i - 128
+        if flavors.has_key(i):
+                return flavors.keys()[i - 128]
+        return "unknown"
 
 def tail(path):
 	p = subprocess.Popen(['tail', '-n1', path],
-- 
2.5.5



More information about the CRIU mailing list