Forgot to decode the bytes data

This commit is contained in:
Anton Hvornum 2019-04-11 20:07:32 +02:00
parent 6e3e94d284
commit 3863691b49
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ def grab_partitions(dev):
## TODO: Replace o = sys_command() with code, o = sys_command()
## and make sys_command() return the exit-code, way safer than checking output strings :P
return {}
r = json.loads(o)
r = json.loads(o.decode('UTF-8'))
if len(r['blockdevices']) and 'children' in r['blockdevices'][0]:
for part in r['blockdevices'][0]['children']:
parts[part['name'][len(drive_name):]] = {