mirror of https://github.com/m-labs/artiq.git
ctlmgr: do not raise exceptions in Controllers.__setitem__. Closes #1198
This commit is contained in:
parent
e3624ca86d
commit
6fdfd6103f
|
@ -178,13 +178,17 @@ class Controllers:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
def __setitem__(self, k, v):
|
def __setitem__(self, k, v):
|
||||||
if (isinstance(v, dict) and v["type"] == "controller" and
|
try:
|
||||||
self.host_filter in get_ip_addresses(v["host"])):
|
if (isinstance(v, dict) and v["type"] == "controller" and
|
||||||
v["command"] = v["command"].format(name=k,
|
self.host_filter in get_ip_addresses(v["host"])):
|
||||||
bind=self.host_filter,
|
v["command"] = v["command"].format(name=k,
|
||||||
port=v["port"])
|
bind=self.host_filter,
|
||||||
self.queue.put_nowait(("set", (k, v)))
|
port=v["port"])
|
||||||
self.active_or_queued.add(k)
|
self.queue.put_nowait(("set", (k, v)))
|
||||||
|
self.active_or_queued.add(k)
|
||||||
|
except:
|
||||||
|
logger.error("Failed to process device database entry %s", k,
|
||||||
|
exc_info=True)
|
||||||
|
|
||||||
def __delitem__(self, k):
|
def __delitem__(self, k):
|
||||||
if k in self.active_or_queued:
|
if k in self.active_or_queued:
|
||||||
|
|
Loading…
Reference in New Issue