Commit f3b14c65 authored by Guillaume Seguin's avatar Guillaume Seguin

Ignore socket timeout issues on flush in printcore

parent bdbde704
...@@ -581,7 +581,11 @@ class printcore(): ...@@ -581,7 +581,11 @@ class printcore():
except: pass except: pass
try: try:
self.printer.write(str(command + "\n")) self.printer.write(str(command + "\n"))
if self.printer_tcp: self.printer.flush() if self.printer_tcp:
try:
self.printer.flush()
except socket.timeout:
pass
self.writefailures = 0 self.writefailures = 0
except socket.error as e: except socket.error as e:
if e.errno is None: if e.errno is None:
......
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