2
0
mirror of https://github.com/mbusb/multibootusb synced 2024-11-18 15:25:46 +00:00

Merge pull request #205 from alandmoore/master

Fix #180: crash when fdisk fails on usb disk device
This commit is contained in:
multibootusb 2017-10-21 00:32:33 +05:30 committed by GitHub
commit 7df6e80992

View File

@ -219,7 +219,11 @@ def details_udev(usb_disk_part):
gen.log("ERROR: Unknown disk/partition (%s)" % str(usb_disk_part))
return None
fdisk_cmd_out = subprocess.check_output('fdisk -l ' + usb_disk_part, shell=True)
try:
fdisk_cmd_out = subprocess.check_output('fdisk -l ' + usb_disk_part, shell=True)
except subprocess.CalledProcessError:
gen.log("ERROR: fdisk failed on disk/partition (%s)" % str(usb_disk_part))
return None
if b'Extended' in fdisk_cmd_out:
mount_point = ''