# HG changeset patch # User David Douard # Date 1219341174 -7200 # Node ID 8ec1c26a4a9978c84a3dc31d36eeef8bd8257116 # Parent e6340960fcbecdd5451adc04ce2747f8a2b4d1c1 Small fixes to HPGL plotter (be a little bit more robust) diff -r e6340960fcbe -r 8ec1c26a4a99 pygpibtoolkit/plotter/hpgl_parser.py --- a/pygpibtoolkit/plotter/hpgl_parser.py Thu Aug 21 19:52:02 2008 +0200 +++ b/pygpibtoolkit/plotter/hpgl_parser.py Thu Aug 21 19:52:54 2008 +0200 @@ -40,7 +40,11 @@ else: cmd = data[self.idx: self.idx+2].upper() self.idx += 2 - getattr(self, cmd)() + try: + getattr(self, cmd)() + except AttributeError: + print "WARNING: received unknown command %s"%repr(cmd) + while self.idx