aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--climl/imap.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/climl/imap.py b/climl/imap.py
index 14ecf2f..69e2117 100644
--- a/climl/imap.py
+++ b/climl/imap.py
@@ -145,7 +145,12 @@ def main(callback=None):
for oneid in idlist:
print('calling callback...')
callback('mail: ' + str(oneid))
- except (socket.error, socket.timeout):
+ except (socket.error, socket.timeout, backports.ssl.SSLError):
+ print('socket/ssl error, retrying in 10s...')
+ try:
+ time.sleep(10) # wait between retries
+ except KeyboardInterrupt:
+ break
pass
except KeyboardInterrupt:
break