From 03e317780bed3c34c669b063cf3e0377c469fad3 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 18 Oct 2015 14:37:08 +0800 Subject: [PATCH] device_db: make best_effort parameter optional for controllers --- artiq/master/worker_db.py | 4 ++-- examples/master/device_db.pyon | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/artiq/master/worker_db.py b/artiq/master/worker_db.py index 3ba176e09..950ec147f 100644 --- a/artiq/master/worker_db.py +++ b/artiq/master/worker_db.py @@ -22,8 +22,8 @@ def _create_device(desc, device_mgr): device_class = getattr(module, desc["class"]) return device_class(device_mgr, **desc["arguments"]) elif ty == "controller": - if desc["best_effort"]: - cl = BestEffortClient + if desc.get("best_effort", False): + cls = BestEffortClient else: cls = Client # Automatic target can be specified either by the absence of diff --git a/examples/master/device_db.pyon b/examples/master/device_db.pyon index effe4ef95..4e5618f3b 100644 --- a/examples/master/device_db.pyon +++ b/examples/master/device_db.pyon @@ -92,28 +92,24 @@ "qc_q1_0": { "type": "controller", - "best_effort": false, "host": "::1", "port": 4000, "command": "pdq2_controller -p {port} --bind {bind} --simulation --dump qc_q1_0.bin" }, "qc_q1_1": { "type": "controller", - "best_effort": false, "host": "::1", "port": 4001, "command": "pdq2_controller -p {port} --bind {bind} --simulation --dump qc_q1_1.bin" }, "qc_q1_2": { "type": "controller", - "best_effort": false, "host": "::1", "port": 4002, "command": "pdq2_controller -p {port} --bind {bind} --simulation --dump qc_q1_2.bin" }, "qc_q1_3": { "type": "controller", - "best_effort": false, "host": "::1", "port": 4003, "command": "pdq2_controller -p {port} --bind {bind} --simulation --dump qc_q1_3.bin"