diff --git a/FofbTool/Utils.py b/FofbTool/Utils.py index dc7606d33a2f20e62a270ca53220f25e4ea5ebdd..609b5cc3d573f0bb701b7e29c646569d2dbba747 100644 --- a/FofbTool/Utils.py +++ b/FofbTool/Utils.py @@ -38,8 +38,13 @@ tangopath.update(tangopath_nodes) def init_opcua(): """ Run init on all OPCUA devices. Catch DevFailed and inform via log. + Does nothing if Fofb is running. """ + if not check_fofbnotrunning(): + logger.warning("Not running configuration of combpm because FOFB seems to be running.") + return + for i,(n,p) in enumerate(tangopath_nodes.items()): logger.info("Perform init() on {} '{}'".format(n,p)) try: @@ -51,8 +56,13 @@ def init_opcua(): def init_watcher(): """ Run init on Fofb-Watcher, waiting for its completion then init on the FofbCommand. + Does nothing if Fofb is running. """ + if not check_fofbnotrunning(): + logger.warning("Not running configuration of combpm because FOFB seems to be running.") + return + try: wprx=tango.DeviceProxy(tangopath["fofb-watcher"]) wprx.set_timeout_millis(30000)