hardware_testbench: clean up artiq_core_exeption printing

This commit is contained in:
Robert Jördens 2016-03-09 17:22:15 +01:00
parent b50e3fabb0
commit 9a661bd273
1 changed files with 3 additions and 1 deletions

View File

@ -125,5 +125,7 @@ class ExperimentCase(unittest.TestCase):
# Reduce amount of text on terminal. # Reduce amount of text on terminal.
raise error from None raise error from None
except Exception as exn: except Exception as exn:
exn.args = exn.args[0] + "\n" + str(exn.artiq_core_exception), if hasattr(exn, "artiq_core_exception"):
exn.args = "{}\n{}".format(exn.args[0],
exn.artiq_core_exception),
raise exn raise exn