[Spambayes-checkins] spambayes/spambayes UserInterface.py, 1.18, 1.19

Richie Hindle richiehindle at users.sourceforge.net
Thu Aug 28 15:17:31 EDT 2003


Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv26359

Modified Files:
	UserInterface.py 
Log Message:
Fixed the OE Mailbox code - the module is called oe_mailbox,
not oe.mailbox.  This is untested (he admits shamefacedly) - I'm
not an OE user so I can't test it, but this bug was causing all
through-the-web training to fail so I applied the obvious fix.


Index: UserInterface.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/UserInterface.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** UserInterface.py	26 Aug 2003 04:30:41 -0000	1.18
--- UserInterface.py	28 Aug 2003 21:17:29 -0000	1.19
***************
*** 332,336 ****
          """Check if the uploaded mailbox file is an Outlook Express DBX one.
  
!         In such a case we use the module oe.mailbox to convert the DBX
          content into a standard mbox file. When the file is not a DBX one,
          this method returns the original content. Testing if the file is a
--- 332,336 ----
          """Check if the uploaded mailbox file is an Outlook Express DBX one.
  
!         In such a case we use the module oe_mailbox to convert the DBX
          content into a standard mbox file. When the file is not a DBX one,
          this method returns the original content. Testing if the file is a
***************
*** 339,350 ****
  
          dbxStream = StringIO.StringIO(content)
!         header = oe.mailbox.dbxFileHeader(dbxStream)
  
          if header.isValid() and header.isMessages():
!             file_info_len = oe.mailbox.dbxFileHeader.FH_FILE_INFO_LENGTH
!             fh_entries = oe.mailbox.dbxFileHeader.FH_ENTRIES
!             fh_ptr = oe.mailbox.dbxFileHeader.FH_TREE_ROOT_NODE_PTR
              
!             info = oe.mailbox.dbxFileInfo(dbxStream,
                                            header.getEntry(file_info_len))
              entries = header.getEntry(fh_entries)
--- 339,350 ----
  
          dbxStream = StringIO.StringIO(content)
!         header = oe_mailbox.dbxFileHeader(dbxStream)
  
          if header.isValid() and header.isMessages():
!             file_info_len = oe_mailbox.dbxFileHeader.FH_FILE_INFO_LENGTH
!             fh_entries = oe_mailbox.dbxFileHeader.FH_ENTRIES
!             fh_ptr = oe_mailbox.dbxFileHeader.FH_TREE_ROOT_NODE_PTR
              
!             info = oe_mailbox.dbxFileInfo(dbxStream,
                                            header.getEntry(file_info_len))
              entries = header.getEntry(fh_entries)
***************
*** 352,369 ****
              
              if address and entries:
!                 tree = oe.mailbox.dbxTree(dbxStream, address, entries)
                  dbxBuffer = ""
  
                  for i in range(entries):
                      address = tree.getValue(i)
!                     messageInfo = oe.mailbox.dbxMessageInfo(dbxStream,
                                                              address)
  
                      if messageInfo.isIndexed(\
!                         oe.mailbox.dbxMessageInfo.MI_MESSAGE_ADDRESS):
!                         address = oe.mailbox.dbxMessageInfo.MI_MESSAGE_ADDRESS
                          messageAddress = \
                                         messageInfo.getValueAsLong(address)
!                         message = oe.mailbox.dbxMessage(dbxStream,
                                                          messageAddress)
  
--- 352,369 ----
              
              if address and entries:
!                 tree = oe_mailbox.dbxTree(dbxStream, address, entries)
                  dbxBuffer = ""
  
                  for i in range(entries):
                      address = tree.getValue(i)
!                     messageInfo = oe_mailbox.dbxMessageInfo(dbxStream,
                                                              address)
  
                      if messageInfo.isIndexed(\
!                         oe_mailbox.dbxMessageInfo.MI_MESSAGE_ADDRESS):
!                         address = oe_mailbox.dbxMessageInfo.MI_MESSAGE_ADDRESS
                          messageAddress = \
                                         messageInfo.getValueAsLong(address)
!                         message = oe_mailbox.dbxMessage(dbxStream,
                                                          messageAddress)
  





More information about the Spambayes-checkins mailing list