diff options
Diffstat (limited to 'Lib/idlelib/ScriptBinding.py')
-rw-r--r-- | Lib/idlelib/ScriptBinding.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py index ae530e5..226c66c 100644 --- a/Lib/idlelib/ScriptBinding.py +++ b/Lib/idlelib/ScriptBinding.py @@ -55,11 +55,11 @@ class ScriptBinding: def check_module_event(self, event): filename = self.getfilename() if not filename: - return + return 'break' if not self.checksyntax(filename): - return + return 'break' if not self.tabnanny(filename): - return + return 'break' def tabnanny(self, filename): f = open(filename, 'r') @@ -120,12 +120,12 @@ class ScriptBinding: """ filename = self.getfilename() if not filename: - return + return 'break' code = self.checksyntax(filename) if not code: - return + return 'break' if not self.tabnanny(filename): - return + return 'break' shell = self.shell interp = shell.interp if PyShell.use_subprocess: @@ -148,6 +148,7 @@ class ScriptBinding: # go to __stderr__. With subprocess, they go to the shell. # Need to change streams in PyShell.ModifiedInterpreter. interp.runcode(code) + return 'break' def getfilename(self): """Get source filename. If not saved, offer to save (or create) file |