From 124b321b8c83d67fee5116529ba1544f86e04cce Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Mon, 27 Feb 2017 15:27:46 +0100 Subject: [PATCH] Less verbose error handling - if socket sending results in EHOSTUNREACH or ETIMEDOUT, don't show backtrace --- src/class_sendDataThread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class_sendDataThread.py b/src/class_sendDataThread.py index a59a628e..5ddb3c11 100644 --- a/src/class_sendDataThread.py +++ b/src/class_sendDataThread.py @@ -105,8 +105,8 @@ class sendDataThread(threading.Thread): select.select([], [self.sslSock if isSSL else self.sock], [], 10) logger.debug('sock.recv retriable error') continue - if e.errno in (errno.EPIPE, errno.ECONNRESET): - logger.debug('Connection error (EPIPE/ECONNRESET)') + if e.errno in (errno.EPIPE, errno.ECONNRESET, errno.EHOSTUNREACH, errno.ETIMEDOUT): + logger.debug('Connection error (EPIPE/ECONNRESET/EHOSTUNREACH/ETIMEDOUT)') return False raise throttle.SendThrottle().wait(amountSent)