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

Improve error handling

parent f687613b
...@@ -39,7 +39,11 @@ class GPIBProtocol(serial.threaded.LineReader): ...@@ -39,7 +39,11 @@ class GPIBProtocol(serial.threaded.LineReader):
if "?" in command: if "?" in command:
self.write_line("++read eoi") self.write_line("++read eoi")
# The command was a query, wait for response # The command was a query, wait for response
line = self.responses.get(timeout=timeout) try:
line = self.responses.get(timeout=timeout)
except Empty:
print("No frequency returned")
return None
return line return line
else: else:
pass pass
......
...@@ -12,7 +12,7 @@ meta = dict(name='hpib', ...@@ -12,7 +12,7 @@ meta = dict(name='hpib',
entry_points= { entry_points= {
'console_scripts': ['trackDoppler=trackDoppler:main'], 'console_scripts': ['trackDoppler=trackDoppler:main'],
}, },
install_requires=['pyserial', 'astropy>=2.0'] install_requires=['pyserial']#, 'astropy>=2.0']
) )
setup(**meta) setup(**meta)
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