diff options
-rw-r--r-- | qolab/hardware/scpi.py | 3 |
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) |