QScintilla/Editor.py

changeset 984
f4bddd7cf51e
parent 971
1243c600ba57
child 989
42b69a254eda
diff -r a1abe3018d04 -r f4bddd7cf51e QScintilla/Editor.py
--- a/QScintilla/Editor.py	Fri Apr 15 18:23:15 2011 +0200
+++ b/QScintilla/Editor.py	Fri Apr 15 18:53:04 2011 +0200
@@ -4219,7 +4219,7 @@
             self.clearFlakesWarnings()
             if self.isPy3File():
                 syntaxError, _fn, errorline, errorindex, _code, _error = \
-                    Utilities.compile(self.fileName, self.text())
+                    Utilities.compile(self.fileName or "(Unnamed)", self.text())
                 if syntaxError:
                     self.toggleSyntaxError(
                         int(errorline), int(errorindex), True, _error)
@@ -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, errorindex, _code, _error, \
                 warnings = Utilities.py2compile(
                     self.fileName,

eric ide

mercurial