From ba759e9264d3c329dffff4b17ad4a8e66717932b Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Fri, 16 Mar 2012 04:37:43 +0100 Subject: [PATCH] Handle another exception most likely caused by a disconnected printer --- printcore.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/printcore.py b/printcore.py index c753c53..f021c52 100755 --- a/printcore.py +++ b/printcore.py @@ -104,6 +104,9 @@ class printcore(): except SerialException, e: print "Can't read from printer (disconnected?)." break + except OSError, e: + print "Can't read from printer (disconnected?)." + break if(len(line)>1): self.log+=[line]