[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] If the LV has no child, don't attempt to grab its format (#497239).



---
 iw/lvm_dialog_gui.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index ef52903..f1c2596 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -1291,7 +1291,10 @@ class VolumeGroupEditor:
 		iter = self.logvolstore.append()
 		self.logvolstore.set_value(iter, 0, lv.lvname)
                 if lv.format.type == "luks":
-                    format = self.storage.devicetree.getChildren(lv)[0].format
+                    try:
+                        format = self.storage.devicetree.getChildren(lv)[0].format
+                    except IndexError:
+                        format = lv.format
                 else:
                     format = lv.format
 
-- 
1.6.1.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]