Disk.target seems to be writable but fails when you try to do so
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-parted (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-parted
Disk.target is implemented as a property with a setter but that will try to set the .type of the underlying PedDisk object, which is readonly. I'd report this bug upstream but the captcha at https:/
>>> disk = Disk(device=d)
>>> disk.type
'mac'
>>> disk.type = 'msdos'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
type = property(lambda s: s.__disk.type.name, lambda s, v: setattr(s.__disk, "type", parted.
TypeError: readonly attribute
>>> ped= disk.getPedDisk()
>>> ped.type = parted.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: readonly attribute