[Spambayes-checkins] spambayes imapfilter.py,1.45,1.46

Barry A. Warsaw bwarsaw at users.sourceforge.net
Sat Jun 21 21:04:16 EDT 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv1175

Modified Files:
	imapfilter.py 
Log Message:
Fix an import and an except clause, since imaplib doesn't export a
module global `error'.

run(): Don't try to suck out the password from Options when -p is
used.  The default value is an empty tuple, so the index 0 isn't
valid.  No matter, that's why you supply the -p option after all.


Index: imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/imapfilter.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** imapfilter.py	22 Jun 2003 01:29:11 -0000	1.45
--- imapfilter.py	22 Jun 2003 03:04:14 -0000	1.46
***************
*** 110,114 ****
  
  from imaplib import Debug
! from imaplib import error
  from imaplib import Time2Internaldate
  try:
--- 110,114 ----
  
  from imaplib import Debug
! from imaplib import IMAP4
  from imaplib import Time2Internaldate
  try:
***************
*** 323,327 ****
          try:
              response = imap.uid("FETCH", self.uid, self.rfc822_command)
!         except error:
              self.rfc822_command = "RFC822"
              response = imap.uid("FETCH", self.uid, self.rfc822_command)
--- 323,327 ----
          try:
              response = imap.uid("FETCH", self.uid, self.rfc822_command)
!         except IMAP4.error:
              self.rfc822_command = "RFC822"
              response = imap.uid("FETCH", self.uid, self.rfc822_command)
***************
*** 698,702 ****
          server = options["imap", "server"][0]
          username = options["imap", "username"][0]
!         pwd = options["imap", "password"][0]
      else:
          if not launchUI:
--- 698,703 ----
          server = options["imap", "server"][0]
          username = options["imap", "username"][0]
!         if not promptForPass:
!             pwd = options["imap", "password"][0]
      else:
          if not launchUI:





More information about the Spambayes-checkins mailing list