diff --git a/FofbTool/Utils.py b/FofbTool/Utils.py index 1e40081c6e7f46464032d25e8ae7834f6d34d221..458d600ad0cb5e2a1d55f46746cb581fff42587a 100644 --- a/FofbTool/Utils.py +++ b/FofbTool/Utils.py @@ -53,17 +53,27 @@ def init_watcher(): Run init on Fofb-Watcher, waiting for its completion then init on the FofbCommand. """ - wprx=tango.DeviceProxy(tangopath["fofb-watcher"]) - wprx.set_timeout_millis(30000) + try: + wprx=tango.DeviceProxy(tangopath["fofb-watcher"]) + wprx.set_timeout_millis(30000) + except tango.DevFailed as e: + logger.error("Could not get DeviceProxy on {}".format(tangopath["fofb-watcher")) + return + logger.debug(str(e)) logger.info("Perform init() on Fofb-Watcher. This takes nearly a minute.") try: wprx.init() except tango.DevFailed as e: logger.error("Could not perform init() on Fofb-Watcher.") + logger.debug(str(e)) logger.info("Perform init() on Fofb-Command.") - tango.DeviceProxy(tangopath["fofb-command"]).init() + try: + tango.DeviceProxy(tangopath["fofb-command"]).init() + except tango.DevFailed as e: + logger.error("Could not perform init() on '{}', got DevFailed.".format(tangopath['fofb-command'])) + logger.debug(str(e)) def confds_opcua(): """