Mon, 04 Jun 2018 22:27:41 +0200
[plotter] use OSError instead of more specific SerialException
pygpibtoolkit/plotter/gpib_plotter.py | file | annotate | diff | comparison | revisions |
--- a/pygpibtoolkit/plotter/gpib_plotter.py Sun Jun 03 18:57:10 2018 +0200 +++ b/pygpibtoolkit/plotter/gpib_plotter.py Mon Jun 04 22:27:41 2018 +0200 @@ -140,7 +140,7 @@ plotter = GPIBplotter( device=options.device, address=int(options.address), timeout=0.06) - except (gpib.SerialException, gpib.ConnectionError) as e: + except (OSError, gpib.ConnectionError) as e: sys.stderr.write('Connection error:\n\t' + '\n\t'.join( [str(x) for x in e.args]) + '\n') sys.stderr.write('Check your parameters\n')