[CRIU] [PATCH] p.haul: don't use undefined variable 'magic'

Andrey Vagin avagin at openvz.org
Mon Mar 24 06:17:34 PDT 2014


E: 74,46: Undefined variable 'magic' (undefined-variable)
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 p_haul_criu.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/p_haul_criu.py b/p_haul_criu.py
index 764a2bc..6e35792 100644
--- a/p_haul_criu.py
+++ b/p_haul_criu.py
@@ -71,7 +71,7 @@ def criu_get_stats(img, file_name):
 	#
 	v = s.unpack(f.read(s.size))
 	if v[0] != CRIU_STATS_MAGIC:
-		raise Exception("Magic is %x, expect %x" % (magic, CRIU_STATS_MAGIC))
+		raise Exception("Magic is %x, expect %x" % (v[0], CRIU_STATS_MAGIC))
 
 	stats = crs.stats_entry()
 	stats.ParseFromString(f.read(v[1]))
-- 
1.8.5.3



More information about the CRIU mailing list