Python exception when attempting to write to full device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
usb-creator (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi,
I formatted a device directly with mkfs.vfat (mkfs.vfat -I /dev/sdc) and usb-creator was happy to try to write to that, but it then failed with:
[17:15:51] Source CD: /home/lool/
[17:15:51] Destination disk: /dev/sdc
[17:15:51] Persistence size: 1432109056 MB
[17:15:52] Traceback (most recent call last):
[17:15:52] File "/usr/lib/
[17:15:52] self.backend.
[17:15:52] File "/usr/lib/
[17:15:52] num = re.match(
[17:15:52] AttributeError: 'NoneType' object has no attribute 'groups'
The fix to avoid the exception and usb-creator hanging seems simple enough, changing:
num = re.match(
to:
match = re.match(
num = None
if match:
num = match.groups()[0]
is enough to properly get a popup that partition number detection failed; of course it would be better to be able to proceed, but there's probably a reason why it's not allowed.
Cheers
The reason that it's not allowed is that, last I checked, HAL didn't report filesystems that spanned a disk, rather than a partition. I have, however, made your suggested change.