--- a/Project/CreateDialogCodeDialog.py Tue May 03 19:35:32 2011 +0200 +++ b/Project/CreateDialogCodeDialog.py Sat May 07 13:38:24 2011 +0200 @@ -73,7 +73,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) @@ -84,7 +87,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"), @@ -454,4 +459,4 @@ """ if button == self.okButton: self.__generateCode() - self.accept() \ No newline at end of file + self.accept()