HarddiskSetup: Don't crash on error
authorMike Looijmans <milo-software@users.sourceforge.net>
Mon, 18 Jul 2011 16:21:13 +0000 (18:21 +0200)
committerMike Looijmans <milo-software@users.sourceforge.net>
Mon, 18 Jul 2011 16:21:13 +0000 (18:21 +0200)
The intention was to simply display any exceptions.

lib/python/Screens/HarddiskSetup.py

index 5d10e24..7bd5595 100644 (file)
@@ -38,7 +38,10 @@ class HarddiskSetup(Screen):
        def hddConfirmed(self, confirmed):
                if not confirmed:
                        return
-               Components.Task.job_manager.AddJob(self.action())
+               try:
+                       Components.Task.job_manager.AddJob(self.action())
+               except Exception, ex:
+                       self.session.open(MessageBox, str(ex), type=MessageBox.TYPE_ERROR, timeout=10)
                self.close()