Thanks to Charles Hewson for reporting the issue.
Blame myself for introducing this issue after Mika got it right in
the first version of his patch.
boot_dev, x = get_device_from_partition(device)
try:
boot_dev, x = get_device_from_partition(device)
try:
part = get_partition_for_path(device)
if part.getFlag(parted.PARTITION_BOOT):
logging.debug("bootflag is enabled on %s" % device)
part = get_partition_for_path(device)
if part.getFlag(parted.PARTITION_BOOT):
logging.debug("bootflag is enabled on %s" % device)