Failed to convert one more iterator

This commit is contained in:
Anton Hvornum 2019-04-11 19:52:50 +02:00
parent 58b9442569
commit 6e3e94d284
1 changed files with 2 additions and 2 deletions

View File

@ -231,8 +231,8 @@ def device_state(name):
def grab_partitions(dev):
drive_name = os.path.basename(dev)
parts = oDict()
o = sys_command('lsblk -o name -J -b {dev}'.format(dev=dev)).exec()
if b'not a block device' in b''.join(o):
o = b''.join(sys_command('lsblk -o name -J -b {dev}'.format(dev=dev)).exec())
if b'not a block device' in o:
## 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 {}