diff --git a/artiq/master/worker_impl.py b/artiq/master/worker_impl.py index c132e827a..a7b1323d1 100644 --- a/artiq/master/worker_impl.py +++ b/artiq/master/worker_impl.py @@ -183,7 +183,7 @@ def setup_diagnostics(experiment_file, repository_path): if repository_path is not None: message = message.replace(repository_path, "") - if diagnostic.level == 'warning': + if diagnostic.level == "warning": logging.warn(message) else: logging.error(message) @@ -200,6 +200,7 @@ def setup_diagnostics(experiment_file, repository_path): # wrapping it in layers of indirection. artiq.coredevice.core._DiagnosticEngine.render_diagnostic = render_diagnostic + def main(): sys.stdout = LogForwarder() sys.stderr = LogForwarder() @@ -268,10 +269,10 @@ def main(): except Exception as exc: lines = ["Terminating with exception\n"] lines += traceback.format_exception_only(type(exc), exc) - if hasattr(exc, 'parent_traceback'): + if hasattr(exc, "parent_traceback"): lines += exc.parent_traceback logging.error("".join(lines).rstrip(), - exc_info=not hasattr(exc, 'parent_traceback')) + exc_info=not hasattr(exc, "parent_traceback")) finally: device_mgr.close_devices()