InstrumentChannel: allow None sites
Allow site to be None (still must be explicitly specified). If the site
is None, the label if created using only the measurement type.
diff --git a/devlib/instrument/__init__.py b/devlib/instrument/__init__.py
index 36bd4ed..856a3af 100644
--- a/devlib/instrument/__init__.py
+++ b/devlib/instrument/__init__.py
@@ -188,7 +188,9 @@
@property
def label(self):
- return '{}_{}'.format(self.site, self.kind)
+ if self.site is not None:
+ return '{}_{}'.format(self.site, self.kind)
+ return self.kind
name = label