Added code to cover more failure situations of PyQt4 uic. 5_1_x

Fri, 29 Jul 2011 18:24:15 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 29 Jul 2011 18:24:15 +0200
branch
5_1_x
changeset 1207
f6d920580635
parent 1204
398b99016b07
child 1209
9ca5500d99cb

Added code to cover more failure situations of PyQt4 uic.

Project/CreateDialogCodeDialog.py file | annotate | diff | comparison | revisions
diff -r 398b99016b07 -r f6d920580635 Project/CreateDialogCodeDialog.py
--- a/Project/CreateDialogCodeDialog.py	Wed Jul 27 19:07:01 2011 +0200
+++ b/Project/CreateDialogCodeDialog.py	Fri Jul 29 18:24:15 2011 +0200
@@ -117,7 +117,7 @@
         try:
             dlg = uic.loadUi(self.formFile)
             return dlg.objectName()
-        except AttributeError as err:
+        except (AttributeError, ImportError) as err:
             E5MessageBox.critical(self,
                 self.trUtf8("uic error"),
                 self.trUtf8("""<p>There was an error loading the form <b>{0}</b>.</p>"""
@@ -133,7 +133,7 @@
         try:
             dlg = uic.loadUi(self.formFile)
             return dlg.metaObject().className()
-        except AttributeError as err:
+        except (AttributeError, ImportError) as err:
             E5MessageBox.critical(self,
                 self.trUtf8("uic error"),
                 self.trUtf8("""<p>There was an error loading the form <b>{0}</b>.</p>"""

eric ide

mercurial