[Spambayes-checkins] spambayes/pspam pop.py,1.2,1.3 scoremsg.py,1.1,1.2 update.py,1.1,1.2

Just van Rossum jvr@users.sourceforge.net
Thu Nov 7 22:30:13 2002


Update of /cvsroot/spambayes/spambayes/pspam
In directory usw-pr-cvs1:/tmp/cvs-serv25250/pspam

Modified Files:
	pop.py scoremsg.py update.py 
Log Message:
Mass checkin: Remain compatible with Python 2.2. Only tested with pop3proxy.py.

Index: pop.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/pspam/pop.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pop.py	5 Nov 2002 22:57:27 -0000	1.2
--- pop.py	7 Nov 2002 22:30:10 -0000	1.3
***************
*** 45,48 ****
--- 45,55 ----
  from pspam.options import options
  
+ try:
+     True, False
+ except NameError:
+     # Maintain compatibility with Python 2.2
+     True, False = 1, 0
+ 
+ 
  HEADER = "X-Spambayes: %5.3f\r\n"
  HEADER_SIZE = len(HEADER % 0.0)

Index: scoremsg.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/pspam/scoremsg.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** scoremsg.py	4 Nov 2002 04:44:19 -0000	1.1
--- scoremsg.py	7 Nov 2002 22:30:10 -0000	1.2
***************
*** 12,15 ****
--- 12,22 ----
  import pspam.options
  
+ try:
+     True, False
+ except NameError:
+     # Maintain compatibility with Python 2.2
+     True, False = 1, 0
+ 
+ 
  def main(fp):
      cs = ClientStorage("/var/tmp/zeospam")

Index: update.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/pspam/update.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** update.py	4 Nov 2002 04:44:19 -0000	1.1
--- update.py	7 Nov 2002 22:30:10 -0000	1.2
***************
*** 10,13 ****
--- 10,20 ----
  from pspam.options import options
  
+ try:
+     True, False
+ except NameError:
+     # Maintain compatibility with Python 2.2
+     True, False = 1, 0
+ 
+ 
  def folder_exists(L, p):
      """Return true folder with path p exists in list L."""