offlineimap rev 568
"Automatic Subversion Change Mailer" <[email protected]> Thu, 14 Aug 2003 13:56:17 -0500 (CDT)
| Newsgroups | gmane.mail.imap.offlineimap.subversion |
|---|---|
| Message-ID | <[email protected]> |
You are receiving this message because
all commits get sent to this address.
Author: jgoerzen
Date: 2003-08-14 13:56:11 -0500 (Thu, 14 Aug 2003)
New Revision: 568
Modified:
offlineimap/branches/twisted/offlineimap/imapserver.py
offlineimap/branches/twisted/offlineimap/repository/IMAP.py
Log:
Tidied up debug code for IMAP side.
Fixed a bug in keepalive wherein the deferred was getting called back too
soon.
Diff:
Modified: offlineimap/branches/twisted/offlineimap/imapserver.py
===================================================================
--- offlineimap/branches/twisted/offlineimap/imapserver.py 2003-08-14 18:33:18 UTC (rev 567)
+++ offlineimap/branches/twisted/offlineimap/imapserver.py 2003-08-14 18:56:11 UTC (rev 568)
@@ -24,7 +24,12 @@
from twistedfixes.imap4 import IMAP4Client
from twisted.internet.ssl import ClientContextFactory
from imaputil import rd
+import re
+def getname(object):
+ name = str(object)
+ return re.search(r'instance at 0x([0-9A-Za-z]+)>', name).group(1)
+
class MyIMAP(IMAP4Client):
def connectionMade(self):
#print "Connectionmade."
@@ -32,10 +37,15 @@
def sendLine(self, line):
ui = UIBase.getglobalui()
- ui.debug('imap', 'Send: ' + str(line))
+ ui.debug('imap', getname(self) + ' Send: ' + str(line))
return IMAP4Client.sendLine(self, line)
+ def lineReceived(self, line):
+ ui = UIBase.getglobalui()
+ ui.debug('imap', getname(self) + ' Recv: ' + str(line))
+ return IMAP4Client.lineReceived(self, line)
+
class IMAPClientFactory(protocol.ClientFactory):
protocol = MyIMAP
def __init__(self, imapserver):
@@ -367,6 +377,7 @@
self.kaconnections.append(imapobj)
d = imapobj.noop()
d.addCallback(noopdone, i)
+ return d
for i in range(self.kanumconnections):
ui.debug('imap', 'keepalive: processing connection %d of %d' % (i,
Modified: offlineimap/branches/twisted/offlineimap/repository/IMAP.py
===================================================================
--- offlineimap/branches/twisted/offlineimap/repository/IMAP.py 2003-08-14 18:33:18 UTC (rev 567)
+++ offlineimap/branches/twisted/offlineimap/repository/IMAP.py 2003-08-14 18:56:11 UTC (rev 568)
@@ -57,6 +57,7 @@
self._schedulekeepalive()
def _schedulekeepalive(self):
+ print "This is schedulekeepalive"
keepalivetime = self.getkeepalive()
if not keepalivetime: return
if self.kacancel: