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

[PATCH] If there's a problem finding removable disks, disable save-to-disk.



Catching all exception is really drastic, but this is the exception reporting
code and we need it to be resiliant to extra errors so we stand a chance of
getting things reported.
---
 gui.py  |    5 ++++-
 text.py |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gui.py b/gui.py
index 3c1b6fd..de165bf 100755
--- a/gui.py
+++ b/gui.py
@@ -743,7 +743,10 @@ class SaveExceptionWindow:
 
         store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
 
-        dests = anaconda.id.storage.exceptionDisks()
+        try:
+            dests = anaconda.id.storage.exceptionDisks()
+        except:
+            dests = []
 
         if flags.livecdInstall:
             self.destCombo.remove_text(0)
diff --git a/text.py b/text.py
index 8d6c6e5..93aea97 100644
--- a/text.py
+++ b/text.py
@@ -242,7 +242,10 @@ class SaveExceptionWindow:
         toplevel.add(scpGrid, 0, 5, (0, 0, 0, 1))
         toplevel.add(buttons, 0, 6, growx=1)
 
-        dests = self.anaconda.id.storage.exceptionDisks()
+        try:
+            dests = self.anaconda.id.storage.exceptionDisks()
+        except:
+            dests = []
 
         if len(dests) > 0:
             for (dev, desc) in dests:
-- 
1.6.1.3


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