From eaa1b44b00ddc9a8037ec60c8db9622112b6d860 Mon Sep 17 00:00:00 2001 From: Chris Ballance Date: Sat, 2 Feb 2019 16:34:38 +0000 Subject: [PATCH] ctlmgr: ignore controllers without a "command" field Allow controllers to be specified without a "command" field. The user takes responsibility for ensuring the controller is running: the controller manager does not attempt to ping the controller. This is useful when one has a common controller shared between several masters. --- artiq/devices/ctlmgr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artiq/devices/ctlmgr.py b/artiq/devices/ctlmgr.py index 52f203545..93306df6d 100644 --- a/artiq/devices/ctlmgr.py +++ b/artiq/devices/ctlmgr.py @@ -180,7 +180,8 @@ class Controllers: def __setitem__(self, k, v): try: if (isinstance(v, dict) and v["type"] == "controller" and - self.host_filter in get_ip_addresses(v["host"])): + self.host_filter in get_ip_addresses(v["host"]) and + "command" in v): v["command"] = v["command"].format(name=k, bind=self.host_filter, port=v["port"])