[Spambayes-checkins] spambayes/spambayes UserInterface.py, 1.40, 1.41 oe_mailbox.py, 1.5, 1.6

Tony Meyer anadelonbrin at users.sourceforge.net
Thu Jan 1 19:20:58 EST 2004


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

Modified Files:
	UserInterface.py oe_mailbox.py 
Log Message:
Fix import error reported by Paul Sorenson.

Index: UserInterface.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/UserInterface.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** UserInterface.py	29 Dec 2003 03:41:10 -0000	1.40
--- UserInterface.py	2 Jan 2004 00:20:56 -0000	1.41
***************
*** 23,26 ****
--- 23,28 ----
    onAdvancedconfig - present the appropriate advanced configuration page
    onHelp - present the help page
+   onStats - present statistics information
+   onBugreport - help the user fill out a bug report
  
  To Do:
***************
*** 79,83 ****
  
  import oe_mailbox
- from time import gmtime, strftime
  
  import PyMeldLite
--- 81,84 ----

Index: oe_mailbox.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/oe_mailbox.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** oe_mailbox.py	30 Dec 2003 16:26:33 -0000	1.5
--- oe_mailbox.py	2 Jan 2004 00:20:56 -0000	1.6
***************
*** 17,25 ****
  import StringIO
  import sys
  
! if sys.platform == "win32":
      import win32api
      import win32con
      from win32com.shell import shell, shellcon
  
  ###########################################################################
--- 17,30 ----
  import StringIO
  import sys
+ from time import gmtime, strftime
  
! try:
      import win32api
      import win32con
      from win32com.shell import shell, shellcon
+ except ImportError:
+     # Not win32, or win32all not installed.
+     # Some functions will not work, but some will.
+     win32api = win32con = shell = shellcon = None
  
  ###########################################################################
***************
*** 480,483 ****
--- 485,491 ----
          # same format).
          raise NotImplementedError
+     if win32api is None:
+         # Delayed import error from top.
+         raise ImportError("win32all not installed")
  
      reg = win32api.RegOpenKeyEx(win32con.HKEY_USERS, "")





More information about the Spambayes-checkins mailing list