From 72a58fe23c5629413a6d96dadbdccdeab801ced3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 16 Apr 2014 17:58:24 +0200 Subject: [PATCH] Fix exception raising on invalid magic. --- ecleankernel/kernel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecleankernel/kernel.py b/ecleankernel/kernel.py index ce99a1f..d8e80b1 100644 --- a/ecleankernel/kernel.py +++ b/ecleankernel/kernel.py @@ -144,7 +144,7 @@ def real_kv(self): buf = f.read(0x10) if buf[2:6] != b'HdrS': raise NotImplementedError('Invalid magic for kernel file %s (!= HdrS)' - % path) + % vmlinuz) offset = struct.unpack_from('H', buf, 0x0e)[0] f.seek(offset - 0x10, 1) buf = f.read(0x100) # XXX