From a808d26fc209940e1866d28c8bf9455e118d9773 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 16 Jan 2016 10:47:35 -0700 Subject: [PATCH] style --- artiq/master/worker_impl.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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()