wimap

Check-in [3a6568daae]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Deal with imap server idle/timeout and reconnect.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:3a6568daaeb0c3fdb37e45b4f9cf24326f51a0a68fb36f97c4d28f8bae1cf752
User & Date: ajv-899-334-8894@vsta.org 2016-11-28 14:07:37
Context
2016-11-28
14:41
Firewall against spinning check-in: b0dcd65343 user: ajv-899-334-8894@vsta.org tags: master, trunk
14:07
Deal with imap server idle/timeout and reconnect. check-in: 3a6568daae user: ajv-899-334-8894@vsta.org tags: master, trunk
2016-11-27
16:05
Code up message reading check-in: 634e282a41 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to imap.py.

1
2
3
4
5
6
7
8
9
10
11
12
...
189
190
191
192
193
194
195

196


197
198
199
200
201
202
203
#
# imap.py
#       imaplib services
#
import imaplib, time, sys, html2text
from email.header import decode_header
import chore

# Turn an imap BODYSTRUCTURE into a Python list representation
class BodyParser(object):
    def __init__(self, s):
        self.s = s
................................................................................
            res.add(f[1:])

        return res

    # Shim out to no-op test for health
    def noop(self):
        srv = self.srv

        tup = srv.noop()


        if tup[0] != "OK":
            return False
        return True

    # Shim to log off/disconnect
    def logout(self):
        srv = self.srv




|







 







>
|
>
>







1
2
3
4
5
6
7
8
9
10
11
12
...
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#
# imap.py
#       imaplib services
#
import imaplib, time, sys, html2text, quopri
from email.header import decode_header
import chore

# Turn an imap BODYSTRUCTURE into a Python list representation
class BodyParser(object):
    def __init__(self, s):
        self.s = s
................................................................................
            res.add(f[1:])

        return res

    # Shim out to no-op test for health
    def noop(self):
        srv = self.srv
	try:
	    tup = srv.noop()
	except:
	    tup = ("failed", "timeout, probably")
        if tup[0] != "OK":
            return False
        return True

    # Shim to log off/disconnect
    def logout(self):
        srv = self.srv