diff options
author | VG <vg@devys.org> | 2016-05-18 15:15:19 +0200 |
---|---|---|
committer | VG <vg@devys.org> | 2016-05-18 15:15:19 +0200 |
commit | 4d2c093f4ba1d28ea0dc6a4429d6c5e6b98ba4a4 (patch) | |
tree | 36c9188228add9ce1e95760f516cfc4389492b9d | |
parent | 3226bc9c56acc3c4e218351f30794862b142e2b2 (diff) | |
download | climl-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.py | 7 |
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') |