[Spambayes-checkins] spambayes/Outlook2000/sandbox dump_props.py,1.4,1.5

Mark Hammond mhammond@users.sourceforge.net
Mon Nov 4 00:49:13 2002


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

Modified Files:
	dump_props.py 
Log Message:
If the property type is PT_ERROR, show the best error code repr we can.


Index: dump_props.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/sandbox/dump_props.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dump_props.py	2 Nov 2002 11:27:53 -0000	1.4
--- dump_props.py	4 Nov 2002 00:49:11 -0000	1.5
***************
*** 66,75 ****
  
  # Also in new versions of mapituil
! def GetAllProperties(obj, make_tag_names = True):
      tags = obj.GetPropList(0)
      hr, data = obj.GetProps(tags)
      ret = []
      for tag, val in data:
!         if make_tag_names:
              hr, tags, array = obj.GetNamesFromIDs( (tag,) )
              if type(array[0][1])==type(u''):
--- 66,75 ----
  
  # Also in new versions of mapituil
! def GetAllProperties(obj, make_pretty = True):
      tags = obj.GetPropList(0)
      hr, data = obj.GetProps(tags)
      ret = []
      for tag, val in data:
!         if make_pretty:
              hr, tags, array = obj.GetNamesFromIDs( (tag,) )
              if type(array[0][1])==type(u''):
***************
*** 77,80 ****
--- 77,83 ----
              else:
                  name = mapiutil.GetPropTagName(tag)
+             # pretty value transformations
+             if PROP_TYPE(tag)==PT_ERROR:
+                 val = mapiutil.GetScodeString(val)
          else:
              name = tag