From bafb85a27428ef1da47dbcf4d14daf8b63ab8655 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Mon, 25 Sep 2023 15:25:49 +0800 Subject: [PATCH] custom_applet: change constructor, data_changed signatures --- artiq/examples/no_hardware/repository/custom_applet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/examples/no_hardware/repository/custom_applet.py b/artiq/examples/no_hardware/repository/custom_applet.py index 1f197ffbb..0bc124325 100644 --- a/artiq/examples/no_hardware/repository/custom_applet.py +++ b/artiq/examples/no_hardware/repository/custom_applet.py @@ -4,13 +4,13 @@ from artiq.applets.simple import SimpleApplet class DemoWidget(QtWidgets.QLabel): - def __init__(self, args): + def __init__(self, args, ctl): QtWidgets.QLabel.__init__(self) self.dataset_name = args.dataset - def data_changed(self, data, mods): + def data_changed(self, value, metadata, persist, mods): try: - n = str(data[self.dataset_name][1]) + n = str(value[self.dataset_name]) except (KeyError, ValueError, TypeError): n = "---" n = "" + n + ""