Commit b3dd6eb3 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Make HPIB raise a RuntimeError no 'no response'

parent 029e63ad
......@@ -44,7 +44,10 @@ class GPIBProtocol(serial.threaded.LineReader):
Returns:
If the command contains '?', the value returned by
the HPIB device is returned, else None.
the HPIB device is returned.
Raises:
RuntimeError: if no response was received to a query.
"""
with self.lock:
if address:
......@@ -56,7 +59,7 @@ class GPIBProtocol(serial.threaded.LineReader):
try:
line = self.responses.get(timeout=timeout)
except queue.Empty:
return None
raise RuntimeError("HPIB device at address did not respond to query:", command)
return line
else:
pass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment