-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Presence of ROM device raises _ped.DiskException
#1833
Comments
If my proposed fix is agreed upon I will submit a pull request. |
I'll have to have a look at this a bit more |
@Torxed, this should be addressed before a release is made. |
I agree. I personally think it's a small and clean implementation. |
@Torxed @codefiles yes absolutely go ahead with the patch |
Relevant pyparted issue: dcantrell/pyparted#102 |
Will be interesting to see if get_lsblk_info(device.path).type == 'rom':
continue |
The list of devices returned by
parted.getAllDevices()
is iterated over and each device is passed toparted.Disk()
. If that raises an 'unrecognised disk label'DiskLabelException
then the device is passed toparted.freshDisk()
. ROM devices are inlcuded in the list of devices returned byparted.getAllDevices()
and will cause both of these to raise an exception.archinstall/archinstall/lib/disk/device_handler.py
Lines 47 to 52 in 5276d95
Proposed fix
Do not initialize
parted.Disk
orparted.freshDisk
with ROM devices. Useget_lsblk_info()
to get the type of a device and skip the device if the type is 'rom'. See the commit codefiles@08b963f for an implementation of this fix.Traceback
Device information
lsblk -o NAME,PATH,TYPE /dev/sr0
pyparted
Output
The text was updated successfully, but these errors were encountered: