From 33283feacb117dc50299537fa22c9b9a5e7aad0d Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 14 Jan 2015 22:21:59 +0800 Subject: [PATCH] sync_struct: pass mod to notify callback --- artiq/management/sync_struct.py | 10 +++++----- frontend/artiq_client.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/artiq/management/sync_struct.py b/artiq/management/sync_struct.py index 7e4ea2940..9c1a5f0b4 100644 --- a/artiq/management/sync_struct.py +++ b/artiq/management/sync_struct.py @@ -66,15 +66,15 @@ class Subscriber: line = yield from self._reader.readline() if not line: return - obj = pyon.decode(line.decode()) + mod = pyon.decode(line.decode()) - if obj["action"] == "init": - target = self.target_builder(obj["struct"]) + if mod["action"] == "init": + target = self.target_builder(mod["struct"]) else: - process_mod(target, obj) + process_mod(target, mod) if self.notify_cb is not None: - self.notify_cb() + self.notify_cb(mod) class Notifier: diff --git a/frontend/artiq_client.py b/frontend/artiq_client.py index 9ff4f1e31..f6b3a08b4 100755 --- a/frontend/artiq_client.py +++ b/frontend/artiq_client.py @@ -201,7 +201,7 @@ def _show_list(args, notifier_name, display_fun): l[:] = x return l subscriber = Subscriber(notifier_name, init_l, - lambda: display_fun(l)) + lambda mod: display_fun(l)) _run_subscriber(args.server, args.port, subscriber) @@ -212,7 +212,7 @@ def _show_dict(args, notifier_name, display_fun): d.update(x) return d subscriber = Subscriber(notifier_name, init_d, - lambda: display_fun(d)) + lambda mod: display_fun(d)) _run_subscriber(args.server, args.port, subscriber)