git://git.onelab.eu
/
bootmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix the parted-version selection code, f14 has parted.version broken
[bootmanager.git]
/
source
/
steps
/
InstallPartitionDisks.py
diff --git
a/source/steps/InstallPartitionDisks.py
b/source/steps/InstallPartitionDisks.py
index
81d100d
..
7a31eea
100644
(file)
--- 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
"""
# 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:
try:
-
version=
parted.version()
+ parted.version()
return single_partition_device_2_x (device, vars, log)
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)
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):
def single_partition_device_1_x ( device, vars, log):