[Spambayes-checkins] spambayes/Outlook2000 manager.py,1.24,1.25 msgstore.py,1.8,1.9

Tim Peters tim_one@users.sourceforge.net
Fri, 25 Oct 2002 11:47:10 -0700


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

Modified Files:
	manager.py msgstore.py 
Log Message:
BayesManager.score():  temporarily (I hope) changed this to return a
double score, as I've been unable to get an integer score to "show up"
in the SpamProb (Hammie, whatever) field.

MAPIMsgStoreMsg.SetField():  XXX comments detailing my woes in
getting a PT_I4 property to work.


Index: manager.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/manager.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** manager.py	25 Oct 2002 17:47:36 -0000	1.24
--- manager.py	25 Oct 2002 18:47:07 -0000	1.25
***************
*** 205,208 ****
--- 205,216 ----
              score = result
          score = int(round(score * 100.0))
+ 
+         # XXX If I actually return an int, the SpamProb (Hammie, whatever)
+         # XXX custom field shows up as blank.  I haven't been able to figure
+         # XXX out why.  Returning a float here sucks, as it gets displayed
+         # XXX with a useless ".00" tacked on to the end -- but at least it
+         # XXX isn't blank!
+         score = float(score)
+ 
          if evidence:
              return score, the_evidence

Index: msgstore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/msgstore.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** msgstore.py	25 Oct 2002 17:57:15 -0000	1.8
--- msgstore.py	25 Oct 2002 18:47:08 -0000	1.9
***************
*** 295,298 ****
--- 295,306 ----
  
      def SetField(self, prop, val):
+         # XXX If the SpamProb (Hammie, whatever) property is passed in as an
+         # XXX int, Outlook displays the field as all blanks, and sorting on
+         # XXX it doesn't do anything, etc.  I don't know why.  Since I'm
+         # XXX running Python 2.2.2, the _MapiTypeMap above confuses ints
+         # XXX with bools, but the problem persists even if I comment out the
+         # XXX PT_BOOLEAN entry from that dict.  Dumping in prints below show
+         # XXX that type_tag is 3 then, and that matches the defn of PT_I4 in
+         # XXX my system header files.
          self._EnsureObject()
          if type(prop)!=type(0):