[Spambayes-checkins] spambayes/spambayes UserInterface.py, 1.46, 1.47

Tony Meyer anadelonbrin at users.sourceforge.net
Thu May 13 00:05:53 EDT 2004


Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29965/spambayes

Modified Files:
	UserInterface.py 
Log Message:
If a user tried to send a bug report before entering in any
servers to proxy, this would generate an IndexError.  Fix that.

This should be copied into the 1.0 release branch.  (bugfix candidate).

Index: UserInterface.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/UserInterface.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** UserInterface.py	22 Feb 2004 02:41:50 -0000	1.46
--- UserInterface.py	13 May 2004 04:05:50 -0000	1.47
***************
*** 1046,1053 ****
                                % (sb_ver, sb_type, py_ver, os_name,
                                   self.classifier.nham, self.classifier.nspam)
!         domain_guess = options["pop3proxy", "remote_servers"][0]
!         for pre in ["pop.", "pop3.", "mail.",]:
!             if domain_guess.startswith(pre):
!                 domain_guess = domain_guess[len(pre):]
          report.from_addr.value = "[YOUR EMAIL ADDRESS]@%s" % (domain_guess,)
          report.subject.value = "Problem with %s: [PROBLEM SUMMARY]" % \
--- 1046,1057 ----
                                % (sb_ver, sb_type, py_ver, os_name,
                                   self.classifier.nham, self.classifier.nspam)
!         remote_servers = options["pop3proxy", "remote_servers"]
!         if remote_servers:
!             domain_guess = remote_servers[0]
!             for pre in ["pop.", "pop3.", "mail.",]:
!                 if domain_guess.startswith(pre):
!                     domain_guess = domain_guess[len(pre):]
!         else:
!             domain_guess = "[YOUR ISP]"
          report.from_addr.value = "[YOUR EMAIL ADDRESS]@%s" % (domain_guess,)
          report.subject.value = "Problem with %s: [PROBLEM SUMMARY]" % \




More information about the Spambayes-checkins mailing list