offlineimap rev 561
"Automatic Subversion Change Mailer" <[email protected]> Wed, 13 Aug 2003 10:23:34 -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-13 10:23:28 -0500 (Wed, 13 Aug 2003)
New Revision: 561
Modified:
offlineimap/branches/twisted/offlineimap/imapserver.py
offlineimap/branches/twisted/offlineimap/repository/IMAP.py
Log:
Removed some debug code.
Diff:
Modified: offlineimap/branches/twisted/offlineimap/imapserver.py
===================================================================
--- offlineimap/branches/twisted/offlineimap/imapserver.py 2003-08-12 21:38:15 UTC (rev 560)
+++ offlineimap/branches/twisted/offlineimap/imapserver.py 2003-08-13 15:23:28 UTC (rev 561)
@@ -40,16 +40,19 @@
protocol = MyIMAP
def __init__(self, imapserver):
self.imapserver = imapserver
- print "Client factory instantiated."
+ #print "Client factory instantiated."
def startedConnection(self, connector):
- print "Started to connect"
+ pass
+ #print "Started to connect"
def clientConnectionLost(self, connector, reason):
- print "Lost connection:", reason
+ pass
+ #print "Lost connection:", reason
def clientconnectionFailed(self, connector, reason):
- print "Connection failed. Reason:", reason
+ pass
+ #print "Connection failed. Reason:", reason
class IMAPFactory(protocol.ClientFactory):
@@ -129,10 +132,10 @@
def plainauth(self, imapobj):
UIBase.getglobalui().debug('imap',
'Attempting plain authentication')
- print "imapobj is", imapobj
+ #print "imapobj is", imapobj
d = imapobj.login(self.username, self.getpassword())
d.addErrback(self.plainautherror, imapobj)
- print "reference is", self.reference
+ #print "reference is", self.reference
d.addCallback(self.listcallback, imapobj, self.reference, '')
d.addCallback(self.setdelim)
d.addCallback(self._opened)
@@ -140,16 +143,16 @@
imapobj)
def _opened(self, discard = None):
- print "opened"
+ #print "opened"
self.openingcount -= 1
def listcallback(self, discarded, imapobj, reference, path):
- print "listcallback"
+ #print "listcallback"
return imapobj.list(reference, path)
def setdelim(self, listres, triedasterisk = 0):
- print "setdelim"
+ #print "setdelim"
if self.delim == None:
if not len(listres):
# Some buggy IMAP servers do not respond well to LIST "" ""
@@ -161,7 +164,7 @@
d = imapobj.list(self.reference, '*')
d.addCallback(self.setdelim, (1,))
return d
- print "listres is", listres
+ #print "listres is", listres
self.delim, self.root = listres[0][1:]
def plainautherror(self, error, imapobj):
@@ -177,7 +180,7 @@
Pass to it a Deferred. This is the object that you should be returning
from your calling function. When you hit callback() on it, the
connection will be eventually closed."""
- print "acquireconnection"
+ #print "acquireconnection"
#import traceback
#traceback.print_stack()
d2 = self._grabConnection()
@@ -190,9 +193,9 @@
self.openingcount
def _grabConnection(self):
- print "grabConnection"
+ #print "grabConnection"
if len(self.availableconnections):
- print "grabConnection: using existing."
+ #print "grabConnection: using existing."
# Something is available. Just grab it.
conn = self.availableconnections.pop(0)
self.assignedconnections.append(conn)
@@ -203,13 +206,13 @@
d = defer.Deferred()
self.waitingforconnections.append(d)
if self._getConnectionCount() >= self.maxconnections:
- print "grabConnection: putting into wait queue"
+ #print "grabConnection: putting into wait queue"
# Noting is available, and we can't create anything new,
# so we put the caller into the wait queue.
return d
# OK, at this point, nothing is available, but we DO have space
# to generate a new connection. Do it.
- print "Grabconnection: generating new connection."
+ #print "Grabconnection: generating new connection."
self._newconnection()
return d
@@ -228,7 +231,7 @@
print "openingcount", self.openingcount
def _releaseConnection(self, stuff, connection):
- print "releaseconnection:", connection
+ #print "releaseconnection:", connection
self._printconnectionstate()
# Take it out of the active list
self.assignedconnections.remove(connection)
@@ -240,10 +243,10 @@
return stuff
def _handleAvailableConnection(self, connection):
- print "handleAvailableConnection"
+ #print "handleAvailableConnection"
self._printconnectionstate()
if len(self.waitingforconnections):
- print "handleAvailableConnections: waking up existing one."
+ #print "handleAvailableConnections: waking up existing one."
# Somebody is waiting for connections. Give it to him and
# wake him up.
self.assignedconnections.append(connection)
@@ -254,23 +257,23 @@
self._printconnectionstate()
def _newconnection(self):
- print "_newconection called."
+ #print "_newconection called."
self.openingcount += 1
if self.usessl:
- print "Using SSL."
+ #print "Using SSL."
reactor.connectSSL(self.hostname, self.port,
IMAPClientFactory(self),
ClientContextFactory())
else:
- print "Not using SSL"
+ #print "Not using SSL"
reactor.connectTCP(self.hostname, self.port,
IMAPClientFactory(self))
def connectionMade(self, protocol):
- print "This is IMAPServer.connectionMade; handing over to plainauth"
- print "Connectionmade: imapobj is", protocol
+ #print "This is IMAPServer.connectionMade; handing over to plainauth"
+ #print "Connectionmade: imapobj is", protocol
return self.plainauth(protocol)
# FIXME:
Modified: offlineimap/branches/twisted/offlineimap/repository/IMAP.py
===================================================================
--- offlineimap/branches/twisted/offlineimap/repository/IMAP.py 2003-08-12 21:38:15 UTC (rev 560)
+++ offlineimap/branches/twisted/offlineimap/repository/IMAP.py 2003-08-13 15:23:28 UTC (rev 561)
@@ -129,22 +129,22 @@
return folder.IMAP.IMAPFolder
def getfolders(self):
- print "getfolders"
+ #print "getfolders"
if self.folders != None:
return rd(self.folders)
return self.getfolders_needdata()
def _getfolders_needdata_acquired(self, imapobj):
- print "L138 getfolders_needdata_acquired, ref = ", repr(self.imapserver.reference)
- print imapobj
+ #print "L138 getfolders_needdata_acquired, ref = ", repr(self.imapserver.reference)
+ #print imapobj
d = imapobj.list(self.imapserver.reference, '*')
- print "L140"
+ #print "L140"
d.addCallback(self._getfolders_real)
- print "getfolders_needdata_acquired exiting"
+ #print "getfolders_needdata_acquired exiting"
return d
def _getfolders_real(self, listresult):
- print "getfolders_real"
+ #print "getfolders_real"
retval = []
for flags, delim, name in listresult:
print type(flags)