[Spambayes-checkins] spambayes/Outlook2000 addin.py,1.28,1.29 config.py,1.3,1.4 filter.py,1.12,1.13 manager.py,1.32,1.33 msgstore.py,1.22,1.23 train.py,1.15,1.16

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


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

Modified Files:
	addin.py config.py filter.py manager.py msgstore.py train.py 
Log Message:
Mass checkin: Remain compatible with Python 2.2. Only tested with pop3proxy.py.

Index: addin.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/addin.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** addin.py	7 Nov 2002 05:05:03 -0000	1.28
--- addin.py	7 Nov 2002 22:30:08 -0000	1.29
***************
*** 4,7 ****
--- 4,14 ----
  import warnings
  
+ try:
+     True, False
+ except NameError:
+     # Maintain compatibility with Python 2.2
+     True, False = 1, 0
+ 
+ 
  if sys.version_info >= (2, 3):
      # sick off the new hex() warnings!

Index: config.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/config.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** config.py	31 Oct 2002 21:56:59 -0000	1.3
--- config.py	7 Nov 2002 22:30:09 -0000	1.4
***************
*** 3,6 ****
--- 3,13 ----
  # or as a module.
  
+ try:
+     True, False
+ except NameError:
+     # Maintain compatibility with Python 2.2
+     True, False = 1, 0
+ 
+ 
  class _ConfigurationContainer:
      def __init__(self, **kw):

Index: filter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/filter.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** filter.py	1 Nov 2002 02:03:42 -0000	1.12
--- filter.py	7 Nov 2002 22:30:09 -0000	1.13
***************
*** 4,8 ****
  # Copyright PSF, license under the PSF license
  
! def filter_message(msg, mgr, all_actions = True):
      config = mgr.config.filter
      prob = mgr.score(msg)
--- 4,15 ----
  # Copyright PSF, license under the PSF license
  
! try:
!     True, False
! except NameError:
!     # Maintain compatibility with Python 2.2
!     True, False = 1, 0
! 
! 
! def filter_message(msg, mgr, all_actions=True):
      config = mgr.config.filter
      prob = mgr.score(msg)

Index: manager.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/manager.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** manager.py	4 Nov 2002 00:50:09 -0000	1.32
--- manager.py	7 Nov 2002 22:30:09 -0000	1.33
***************
*** 13,16 ****
--- 13,22 ----
  
  try:
+     True, False
+ except NameError:
+     # Maintain compatibility with Python 2.2
+     True, False = 1, 0
+ 
+ try:
      this_filename = os.path.abspath(__file__)
  except NameError:
***************
*** 83,87 ****
          return ret
  
!     def EnsureOutlookFieldsForFolder(self, folder_id, include_sub = False):
          # Ensure that our fields exist on the Outlook *folder*
          # Setting properties via our msgstore (via Ext Mapi) gets the props
--- 89,93 ----
          return ret
  
!     def EnsureOutlookFieldsForFolder(self, folder_id, include_sub=False):
          # Ensure that our fields exist on the Outlook *folder*
          # Setting properties via our msgstore (via Ext Mapi) gets the props

Index: msgstore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/msgstore.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** msgstore.py	5 Nov 2002 11:44:27 -0000	1.22
--- msgstore.py	7 Nov 2002 22:30:09 -0000	1.23
***************
*** 3,6 ****
--- 3,12 ----
  import sys, os
  
+ try:
+     True, False
+ except NameError:
+     # Maintain compatibility with Python 2.2
+     True, False = 1, 0
+ 
  
  # Abstract definition - can be moved out when we have more than one sub-class <wink>

Index: train.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/train.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** train.py	4 Nov 2002 22:50:41 -0000	1.15
--- train.py	7 Nov 2002 22:30:09 -0000	1.16
***************
*** 7,10 ****
--- 7,17 ----
  from win32com.mapi import mapi
  
+ try:
+     True, False
+ except NameError:
+     # Maintain compatibility with Python 2.2
+     True, False = 1, 0
+ 
+ 
  # Note our Message Database uses PR_SEARCH_KEY, *not* PR_ENTRYID, as the
  # latter changes after a Move operation - see msgstore.py