aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-05-18 15:15:19 +0200
committerVG <vg@devys.org>2016-05-18 15:15:19 +0200
commit4d2c093f4ba1d28ea0dc6a4429d6c5e6b98ba4a4 (patch)
tree36c9188228add9ce1e95760f516cfc4389492b9d
parent3226bc9c56acc3c4e218351f30794862b142e2b2 (diff)
downloadcliml-4d2c093f4ba1d28ea0dc6a4429d6c5e6b98ba4a4.tar.gz
climl-4d2c093f4ba1d28ea0dc6a4429d6c5e6b98ba4a4.tar.bz2
climl-4d2c093f4ba1d28ea0dc6a4429d6c5e6b98ba4a4.zip
Use a catch-all for always-on service
Errors are displayed on stdout
-rw-r--r--climl/imap.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/climl/imap.py b/climl/imap.py
index 69e2117..6bdcb04 100644
--- a/climl/imap.py
+++ b/climl/imap.py
@@ -151,7 +151,12 @@ def main(callback=None):
time.sleep(10) # wait between retries
except KeyboardInterrupt:
break
- pass
except KeyboardInterrupt:
break
+ except Exception as e:
+ print('Unhandled exception during connection: ', e)
+ try:
+ time.sleep(10) # wait between retries
+ except KeyboardInterrupt:
+ break
print('end of connection')