QScintilla/Editor.py

branch
5_1_x
changeset 985
749cdce86824
parent 972
841220c4dde2
child 987
156472e165f4
--- a/QScintilla/Editor.py	Fri Apr 15 18:23:39 2011 +0200
+++ b/QScintilla/Editor.py	Fri Apr 15 18:53:34 2011 +0200
@@ -4223,7 +4223,7 @@
             self.clearFlakesWarnings()
             if self.isPy3File():
                 syntaxError, _fn, errorline, _code, _error = \
-                    Utilities.compile(self.fileName, self.text())
+                    Utilities.compile(self.fileName or "(Unnamed)", self.text())
                 if syntaxError:
                     self.toggleSyntaxError(int(errorline), True, _error)
                 else:
@@ -4249,7 +4249,7 @@
                             else:
                                 msg = err.msg
                             self.toggleSyntaxError(err.lineno, True, msg)
-            elif self.isPy2File():
+            elif self.isPy2File() and self.fileName is not None:
                 syntaxError, _fn, errorline, _code, _error, warnings = \
                     Utilities.py2compile(
                         self.fileName, 

eric ide

mercurial