[Spambayes-checkins] spambayes/Outlook2000 config_wizard.py, 1.7, 1.8

Mark Hammond mhammond at users.sourceforge.net
Wed Oct 15 00:11:14 EDT 2003


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

Modified Files:
	config_wizard.py 
Log Message:
The config wizard did not handle msgstore exceptions correctly.

Index: config_wizard.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/config_wizard.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** config_wizard.py	29 Aug 2003 00:08:43 -0000	1.7
--- config_wizard.py	15 Oct 2003 04:11:12 -0000	1.8
***************
*** 44,49 ****
          for id in ids:
              # Only get the folders that actually exist.
!             if manager.message_store.GetFolder(id) is not None:
                  new_config.filter.watch_folder_ids.append(id)
      if not new_config.filter.watch_folder_ids:
          for folder in manager.message_store.YieldReceiveFolders():
--- 44,53 ----
          for id in ids:
              # Only get the folders that actually exist.
!             try:
!                 manager.message_store.GetFolder(id)
!                 # if we get here, it exists!
                  new_config.filter.watch_folder_ids.append(id)
+             except manager.message_store.MsgStoreException:
+                 pass
      if not new_config.filter.watch_folder_ids:
          for folder in manager.message_store.YieldReceiveFolders():
***************
*** 52,64 ****
          fc = manager.config.filter
          if fc.spam_folder_id:
!             folder = manager.message_store.GetFolder(fc.spam_folder_id)
!             if folder is not None:
                  new_config.filter.spam_folder_id = folder.GetID()
                  wc.spam_folder_name = ""
          if fc.unsure_folder_id:
!             folder = manager.message_store.GetFolder(fc.unsure_folder_id)
!             if folder is not None:
                  new_config.filter.unsure_folder_id = folder.GetID()
                  wc.unsure_folder_name = ""
          tc = manager.config.training
          if tc.ham_folder_ids:
--- 56,72 ----
          fc = manager.config.filter
          if fc.spam_folder_id:
!             try:
!                 folder = manager.message_store.GetFolder(fc.spam_folder_id)
                  new_config.filter.spam_folder_id = folder.GetID()
                  wc.spam_folder_name = ""
+             except manager.message_store.MsgStoreException:
+                 pass
          if fc.unsure_folder_id:
!             try:
!                 folder = manager.message_store.GetFolder(fc.unsure_folder_id)
                  new_config.filter.unsure_folder_id = folder.GetID()
                  wc.unsure_folder_name = ""
+             except manager.message_store.MsgStoreException:
+                 pass
          tc = manager.config.training
          if tc.ham_folder_ids:





More information about the Spambayes-checkins mailing list