X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FInstallPartitionDisks.py;h=e86e59a0d48c5c01971f3792fb45784b1d22a17c;hb=d2b791c8d267c08117921aeffd0f08987979faf7;hp=9023b432aa0cec9a51bcd35cb488f5cdbcc41223;hpb=a0d22ecfe8b0fd6fd7b2363048919b6f0cdaa2ad;p=bootmanager.git diff --git a/source/steps/InstallPartitionDisks.py b/source/steps/InstallPartitionDisks.py index 9023b43..e86e59a 100644 --- a/source/steps/InstallPartitionDisks.py +++ b/source/steps/InstallPartitionDisks.py @@ -183,13 +183,20 @@ def single_partition_device( device, vars, log ): """ # two forms, depending on which version of pyparted we have + # v1 does not have a 'version' method + # v2 and above does, but to make it worse, + # parted-3.4 on f14 has parted.version broken and raises SystemError try: - version=parted.version() + parted.version() return single_partition_device_2_x (device, vars, log) - except: + except AttributeError: + # old parted does not have version at all return single_partition_device_1_x (device, vars, log) - - + except SystemError: + # let's assume this is >=2 + return single_partition_device_2_x (device, vars, log) + except: + raise def single_partition_device_1_x ( device, vars, log):