--- a/Project/CreateDialogCodeDialog.py Fri May 06 18:04:19 2011 +0200 +++ b/Project/CreateDialogCodeDialog.py Sat May 07 13:37:58 2011 +0200 @@ -74,7 +74,10 @@ self.__initError = True return - self.__module = ModuleParser.readModule(self.srcFile, caching=False) + try: + self.__module = ModuleParser.readModule(self.srcFile, caching=False) + except ImportError: + pass if self.__module is not None: self.filenameEdit.setText(self.srcFile) @@ -85,7 +88,9 @@ classesList.sort() self.classNameCombo.addItems(classesList) - if os.path.exists(self.srcFile) and self.classNameCombo.count() == 0: + if os.path.exists(self.srcFile) and \ + self.__module is not None and \ + self.classNameCombo.count() == 0: self.__initError = True E5MessageBox.critical(self, self.trUtf8("Create Dialog Code"),