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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 05 May 2012 18:55:21 +0200
changeset 1844
0388a36b5fcf
parent 1843
0c00516e0403
child 1845
d481279d882b

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
--- a/Project/CreateDialogCodeDialog.py	Sat May 05 16:55:21 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