aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scpi.py
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/hardware/scpi.py')
-rw-r--r--qolab/hardware/scpi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qolab/hardware/scpi.py b/qolab/hardware/scpi.py
index 328e261..8564177 100644
--- a/qolab/hardware/scpi.py
+++ b/qolab/hardware/scpi.py
@@ -22,8 +22,9 @@ def response2numStr(strIn, firstSeparator=None, unit=None):
rstr = spltStr[1]
if unit is not None and unit != '':
spltStr = re.split(unit, rstr)
+ if len(spltStr) == 1:
+ unit = None
numberString = spltStr[0]
- unit = spltStr[1]
else:
numberString = rstr
return (prefix, numberString, unit)