aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2022-01-02 16:26:26 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2022-01-02 16:26:26 -0500
commitdf95868bf7250809a13756f1051efb10424553c5 (patch)
tree56e9ee5d7f05117d0f1e381cb219ce17267f6d3c
parentd9b975f87176ba0b616c297b4046404dfe40a421 (diff)
downloadqolab-df95868bf7250809a13756f1051efb10424553c5.tar.gz
qolab-df95868bf7250809a13756f1051efb10424553c5.zip
generalise getConfig to check for 'property' like attributes
-rw-r--r--qolab/hardware/basic.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/qolab/hardware/basic.py b/qolab/hardware/basic.py
index 5e8d17d..387c4b2 100644
--- a/qolab/hardware/basic.py
+++ b/qolab/hardware/basic.py
@@ -45,6 +45,9 @@ class BasicInstrument:
config = self.config.copy()
dconfig = {}
for p in self.deviceProperties:
+ if hasattr(self, p) or hasattr(type(self), p):
+ dconfig[p] = getattr(self, p)
+ continue
getter = f'get{p}'
if not hasattr(self, getter):
print(f'warning no getter for {p}, i.e. {getter} is missing')