mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
zdtm: handle unknown flavors
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
fa8b12a1ec
commit
f55265f0f5
@@ -245,7 +245,10 @@ def encode_flav(f):
|
|||||||
return (flavors.keys().index(f) + 128)
|
return (flavors.keys().index(f) + 128)
|
||||||
|
|
||||||
def decode_flav(i):
|
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):
|
def tail(path):
|
||||||
p = subprocess.Popen(['tail', '-n1', path],
|
p = subprocess.Popen(['tail', '-n1', path],
|
||||||
|
Reference in New Issue
Block a user