From 07ba177e58bfe5cd7e9a2788c519d0a173653fc9 Mon Sep 17 00:00:00 2001
From: Sergei Trofimov <sergei.trofimov@arm.com>
Date: Thu, 7 Sep 2017 09:52:20 +0100
Subject: [PATCH] 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.
---
 devlib/instrument/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 @@ class InstrumentChannel(object):
 
     @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