Skip to content

Commit

Permalink
Merge fa0aa7a into 68aa471
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Feb 21, 2018
2 parents 68aa471 + fa0aa7a commit 0901084
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions spinn_front_end_common/interface/abstract_spinnaker_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,11 @@ def _run(self, run_time, run_until_complete=False):
# Install the Control-C handler
signal.signal(signal.SIGINT, self.signal_handler)
self._raise_keyboard_interrupt = True
sys.excepthook = sys.__excepthook__
gettrace = sys.gettrace()
if gettrace is None:
sys.excepthook = sys.__excepthook__
else:
logger.info("Not setting exception handler as in debug mode")

logger.info("Starting execution process")

Expand Down Expand Up @@ -1019,7 +1023,11 @@ def _run(self, run_time, run_until_complete=False):

# Indicate that the signal handler needs to act
self._raise_keyboard_interrupt = False
sys.excepthook = self.exception_handler
gettrace = sys.gettrace()
if gettrace is None:
sys.excepthook = self.exception_handler
else:
logger.info("Not replacing exception handler as in debug mode")

# update counter for runs (used by reports and app data)
self._n_calls_to_run += 1
Expand Down

0 comments on commit 0901084

Please sign in to comment.