From 1efd5844036b3cbcf89a8632919cd21bf74957b8 Mon Sep 17 00:00:00 2001 From: x03daop Date: Wed, 23 Aug 2017 11:37:13 +0200 Subject: [PATCH] Closedown --- script/scan_guard.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/scan_guard.py b/script/scan_guard.py index eaf57f21..6b1752f2 100644 --- a/script/scan_guard.py +++ b/script/scan_guard.py @@ -897,19 +897,19 @@ def main(): guard.controls_active = True # True = simulate beam down after a few seconds, False = normal operation guard.test = False - + + global beam_ok guard.connect() try: - pass guard.mainloop() + beam_ok = True except KeyboardInterrupt: logging.info("scan guard aborted by user") + beam_ok = True except: print sys.exc_info()[1] print "guard shutting down - measurements enabled" - global beam_ok - beam_ok = True #This is to dispose created channels - otherwise, if channel is off, old channels remain and CPU consumption goes 100%. import _ca