[plotter] use OSError instead of more specific SerialException

Mon, 04 Jun 2018 22:27:41 +0200

author
David Douard <david.douard@logilab.fr>
date
Mon, 04 Jun 2018 22:27:41 +0200
changeset 108
dadf7c8d43ad
parent 107
ffd1559ad7f0
child 109
c2d93abebab3

[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')

mercurial