From a7810502f6c2064a982bb14f07934ac383f3f875 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 18 Aug 2018 10:58:40 +0800 Subject: [PATCH] artiq_coremgmt: add option to specify core device address directly --- artiq/frontend/artiq_coremgmt.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/artiq/frontend/artiq_coremgmt.py b/artiq/frontend/artiq_coremgmt.py index 8a9dd6c27..11b75628d 100755 --- a/artiq/frontend/artiq_coremgmt.py +++ b/artiq/frontend/artiq_coremgmt.py @@ -17,6 +17,9 @@ def get_argparser(): verbosity_args(parser) parser.add_argument("--device-db", default="device_db.py", help="device database file (default: '%(default)s')") + parser.add_argument("-D", "--device", default=None, + help="use specified core device address instead of " + "reading device database") tools = parser.add_subparsers(dest="tool") tools.required = True @@ -133,7 +136,10 @@ def main(): args = get_argparser().parse_args() init_logger(args) - core_addr = DeviceDB(args.device_db).get("core")["arguments"]["host"] + if args.device is None: + core_addr = DeviceDB(args.device_db).get("core")["arguments"]["host"] + else: + core_addr = args.device mgmt = CommMgmt(core_addr) if args.tool == "log":