Fixed an issue in the dialog code creation dialog with scanning a Python source file not having the standard extension. 5_2_x

Sat, 05 May 2012 18:55:21 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 05 May 2012 18:55:21 +0200
branch
5_2_x
changeset 1846
75d9128748dc
parent 1842
4113dcd158eb
child 1847
ed220d11ee1e

Fixed an issue in the dialog code creation dialog with scanning a Python source file not having the standard extension.

Project/CreateDialogCodeDialog.py file | annotate | diff | comparison | revisions
diff -r 4113dcd158eb -r 75d9128748dc Project/CreateDialogCodeDialog.py
--- a/Project/CreateDialogCodeDialog.py	Sat May 05 15:47:22 2012 +0200
+++ b/Project/CreateDialogCodeDialog.py	Sat May 05 18:55:21 2012 +0200
@@ -78,7 +78,13 @@
                 return
             
             try:
-                self.__module = ModuleParser.readModule(self.srcFile, caching=False)
+                splitExt = os.path.splitext(self.srcFile)
+                if len(splitExt) == 2:
+                    exts = [splitExt[1]]
+                else:
+                    exts = None
+                self.__module = ModuleParser.readModule(self.srcFile, extensions=exts,
+                                                        caching=False)
             except ImportError:
                 pass
         

eric ide

mercurial