Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
HPIB
Commits
b3dd6eb3
Commit
b3dd6eb3
authored
May 11, 2018
by
Tammo Jan Dijkema
Browse files
Make HPIB raise a RuntimeError no 'no response'
parent
029e63ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
hpib.py
View file @
b3dd6eb3
...
...
@@ -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
:
r
eturn
None
r
aise
RuntimeError
(
"HPIB device at address did not respond to query:"
,
command
)
return
line
else
:
pass
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment