Skip to content
Permalink
Browse files

Fix running unsaved script in console

  • Loading branch information
nyalldawson committed May 16, 2016
1 parent d64f474 commit 11ee2fc809b62b424daa259d9063a3c4669e472e
Showing with 2 additions and 1 deletion.
  1. +2 −1 python/console/console_editor.py
@@ -633,7 +633,8 @@ def syntaxCheck(self, filename=None, fromContextMenu=True):
source = source.encode('utf-8')
if isinstance(filename, type(u"")):
filename = filename.encode('utf-8')
compile(source, filename, 'exec')
if filename:
compile(source, filename, 'exec')
except SyntaxError as detail:
eline = detail.lineno and detail.lineno or 1
ecolumn = detail.offset and detail.offset or 1

0 comments on commit 11ee2fc

Please sign in to comment.
You can’t perform that action at this time.