[Commits] (bkirsch) added callback to loginClientInsecure
commits at osafoundation.org
commits at osafoundation.org
Wed Aug 25 17:48:59 PDT 2004
Commit by: bkirsch
Modified files:
chandler/parcels/osaf/mail/imap.py 1.16 1.17
Log message:
added callback to loginClientInsecure
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/mail/imap.py.diff?r1=text&tr1=1.16&r2=text&tr2=1.17
Index: chandler/parcels/osaf/mail/imap.py
diff -u chandler/parcels/osaf/mail/imap.py:1.16 chandler/parcels/osaf/mail/imap.py:1.17
--- chandler/parcels/osaf/mail/imap.py:1.16 Wed Aug 25 15:34:42 2004
+++ chandler/parcels/osaf/mail/imap.py Wed Aug 25 17:48:58 2004
@@ -1,5 +1,5 @@
-__revision__ = "$Revision: 1.16 $"
-__date__ = "$Date: 2004/08/25 22:34:42 $"
+__revision__ = "$Revision: 1.17 $"
+__date__ = "$Date: 2004/08/26 00:48:58 $"
__copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -106,7 +106,6 @@
self.accountUUID = account.itsUUID
self.account = None
self.downloadedStr = None
- self.loginTried = False
def getMail(self):
@@ -207,8 +206,8 @@
assert self.account is not None, "Account is None can not login client"
- username = self.account.username
- password = self.account.password
+ username = str(self.account.username)
+ password = str(self.account.password)
self.proto.registerAuthenticator(imap4.CramMD5ClientAuthenticator(username))
self.proto.registerAuthenticator(imap4.LOGINAuthenticator(username))
@@ -220,11 +219,12 @@
finally:
self.restorePreviousView()
- #XXX: This needs be tested for failure conditions
def loginClientInsecure(self, error, username, password):
- if not self.loginTried:
- self.loginTried = True
- return self.proto.login(username, password)
+ if __debug__:
+ self.printCurrentView("loginClientInsecure")
+
+ return self.proto.login(username, password
+ ).addCallback(self.__selectInbox)
def __selectInbox(self, result):
More information about the Commits
mailing list