Skip to content
Snippets Groups Projects
Commit 8434e8de authored by BRONES Romain's avatar BRONES Romain
Browse files

fix: Add try/except on watcher init

* It did not work last time, try to see why
parent 3923503c
No related branches found
No related tags found
No related merge requests found
......@@ -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():
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment