Bug #1983
ctools.test() and gammalib.test() exits python interpreter
Status: | Closed | Start date: | 04/04/2017 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 1.3.0 | |||
Duration: |
Description
ctools.test() and gammalib.test() exit the python ineterpreter at the end. In ipython this lead to an error (error message below). Removing the sys.exit(rc) line in the test() methods removed the error.
TypeError Traceback (most recent call last)
/usr/local/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in run_code(self, code_obj, result)
2875 result.error_in_exec = e
2876 self.showtraceback(exception_only=True)
→ 2877 warn(“To exit: use 'exit’, 'quit’, or Ctrl-D.”, level=1)
2878 except self.custom_exceptions:
2879 etype, value, tb = sys.exc_info()
TypeError: 'level’ is an invalid keyword argument for this function
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen over 7 years ago
- Status changed from New to Feedback
- Assigned To set to Knödlseder Jürgen
- Target version set to 1.3.0
- % Done changed from 0 to 100
I replaced the system exits by Python exceptions. New code is in devel
. Could you please check that it works?
#2 Updated by Buehler Rolf over 7 years ago
I checked it and the problem is solved. The interpreter is not exited anymore and ipython gives no errors.
#3 Updated by Knödlseder Jürgen over 7 years ago
- Status changed from Feedback to Closed