##// END OF EJS Templates
only exit on error if `interact` is False
Min RK -
Show More
@@ -413,6 +413,8 b' class InteractiveShellApp(Configurable):'
413 self.log.warning("Error in executing line in user namespace: %s" %
413 self.log.warning("Error in executing line in user namespace: %s" %
414 line)
414 line)
415 self.shell.showtraceback()
415 self.shell.showtraceback()
416 if not self.interact:
417 self.exit(1)
416
418
417 # Like Python itself, ignore the second if the first of these is present
419 # Like Python itself, ignore the second if the first of these is present
418 elif self.file_to_run:
420 elif self.file_to_run:
@@ -421,7 +423,8 b' class InteractiveShellApp(Configurable):'
421 self._exec_file(fname, shell_futures=True)
423 self._exec_file(fname, shell_futures=True)
422 except:
424 except:
423 self.shell.showtraceback(tb_offset=4)
425 self.shell.showtraceback(tb_offset=4)
424 self.exit(1)
426 if not self.interact:
427 self.exit(1)
425
428
426 def _run_module(self):
429 def _run_module(self):
427 """Run module specified at the command-line."""
430 """Run module specified at the command-line."""
General Comments 0
You need to be logged in to leave comments. Login now