aboutsummaryrefslogtreecommitdiff
path: root/qolab
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-26 18:06:09 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-26 18:06:09 -0500
commitfd9d6bcb2601aa28a7c39f083e1a01059e1b4715 (patch)
tree20f3b81d9b66b10b1e7f4e8c8f12d7d12716ca5a /qolab
parent4a65a486260bff420108e4c1200b2ad71560e4d1 (diff)
downloadqolab-fd9d6bcb2601aa28a7c39f083e1a01059e1b4715.tar.gz
qolab-fd9d6bcb2601aa28a7c39f083e1a01059e1b4715.zip
make used of DeviceNickname
Diffstat (limited to 'qolab')
-rw-r--r--qolab/tsdb/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/qolab/tsdb/__init__.py b/qolab/tsdb/__init__.py
index 7f7ecc0..a985534 100644
--- a/qolab/tsdb/__init__.py
+++ b/qolab/tsdb/__init__.py
@@ -38,7 +38,10 @@ def tsdb_append_metric_for_class_setter_or_getter(tsdb_logger=None):
action = f.__name__[0:3]
var_name = f.__name__[3:]
val = None
- device_type=cls.config['Device type']
+ if cls.config['DeviceNickname'] is not None:
+ device_type=cls.config['DeviceNickname']
+ else:
+ device_type=cls.config['Device type']
if action == 'get':
""" getter """
val = f(*args, **kwds)
@@ -86,7 +89,7 @@ if __name__ == '__main__':
""" get D variable """
return self.d
- dev = InstWithLog(tsdb_ingester=tsdb_ingester)
+ dev = InstWithLog(tsdb_ingester=tsdb_ingester, device_nickname='tester')
dev.getD()
dev.setD(3)