diff options
| author | 2012-12-07 18:23:16 +0100 | |
|---|---|---|
| committer | 2012-12-07 18:23:16 +0100 | |
| commit | da3a8aa9bc88405b41253a7d96bada93e8e1e50c (patch) | |
| tree | f04bd552a5d57fbe73bbefa517216326743dbd69 /gmail-notmuch.py | |
| parent | Get labels all in one swoop. (diff) | |
| download | gmail-notmuch-da3a8aa9bc88405b41253a7d96bada93e8e1e50c.tar.xz gmail-notmuch-da3a8aa9bc88405b41253a7d96bada93e8e1e50c.zip | |
Reconnect if neccessary.
Diffstat (limited to 'gmail-notmuch.py')
| -rwxr-xr-x | gmail-notmuch.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gmail-notmuch.py b/gmail-notmuch.py index e8adc32..11f14bf 100755 --- a/gmail-notmuch.py +++ b/gmail-notmuch.py @@ -65,6 +65,12 @@ def main(): logout(imap) sys.exit(0) + try: + imap.noop() + except IMAP4_SSL.abort: + print("Server disconnected us.") + imap = login(options) + download_new_messages(imap, database, new_messages, destination) database.close() |
