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(): ...@@ -53,17 +53,27 @@ def init_watcher():
Run init on Fofb-Watcher, waiting for its completion then init on the FofbCommand. Run init on Fofb-Watcher, waiting for its completion then init on the FofbCommand.
""" """
wprx=tango.DeviceProxy(tangopath["fofb-watcher"]) try:
wprx.set_timeout_millis(30000) 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.") logger.info("Perform init() on Fofb-Watcher. This takes nearly a minute.")
try: try:
wprx.init() wprx.init()
except tango.DevFailed as e: except tango.DevFailed as e:
logger.error("Could not perform init() on Fofb-Watcher.") logger.error("Could not perform init() on Fofb-Watcher.")
logger.debug(str(e))
logger.info("Perform init() on Fofb-Command.") 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(): 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