Commit ab3e3fa1 authored by Guillaume Seguin's avatar Guillaume Seguin

Attempt to debug None socket errors

parent 06de65d7
...@@ -584,7 +584,11 @@ class printcore(): ...@@ -584,7 +584,11 @@ class printcore():
if self.printer_tcp: self.printer.flush() if self.printer_tcp: self.printer.flush()
self.writefailures = 0 self.writefailures = 0
except socket.error as e: except socket.error as e:
self.logError(_(u"Can't write to printer (disconnected?) (Socket error {0}): {1}").format(e.errno, decode_utf8(e.strerror))) if e is None:
self.logError("Can't write to printer (disconnected ?):" +
"\n" + traceback.format_exc())
else:
self.logError(_(u"Can't write to printer (disconnected?) (Socket error {0}): {1}").format(e.errno, decode_utf8(e.strerror)))
self.writefailures += 1 self.writefailures += 1
except SerialException as e: except SerialException as e:
self.logError(_(u"Can't write to printer (disconnected?) (SerialException): {0}").format(decode_utf8(str(e)))) self.logError(_(u"Can't write to printer (disconnected?) (SerialException): {0}").format(decode_utf8(str(e))))
......
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