Skip to content

Commit

Permalink
Fix exception raising on invalid magic.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed Apr 16, 2014
1 parent e737832 commit 72a58fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ecleankernel/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72a58fe

Please sign in to comment.