Do not try to read raw disk data as unicode
Fixes regression in commit 9f8fa2853a
:
utils.execute returns unicode by default, but this data is binary.
Change-Id: I5b54c1f6cfac5fff672245c523b9fb647478edbd
This commit is contained in:
parent
11862ccae9
commit
1d12505fa0
@ -149,7 +149,7 @@ def _is_bootloader_loaded(dev):
|
||||
if 'boot sector' in stdout:
|
||||
# Now lets check the signature
|
||||
ddout, dderr = utils.execute(
|
||||
'dd', 'if=%s' % device, 'bs=218', 'count=1')
|
||||
'dd', 'if=%s' % device, 'bs=218', 'count=1', binary=True)
|
||||
stdout, stderr = utils.execute('file', '-', process_input=ddout)
|
||||
# The bytes recovered by dd show as a "dos executable" when
|
||||
# examined with file. In other words, the bootloader is present.
|
||||
|
Loading…
Reference in New Issue
Block a user