[Spambayes-checkins] spambayes/Outlook2000 manager.py,1.48,1.49

Mark Hammond mhammond at users.sourceforge.net
Mon Mar 3 15:20:56 EST 2003


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

Modified Files:
	manager.py 
Log Message:
shutil.move doesn't exist pre Python 2.3


Index: manager.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/manager.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** manager.py	19 Feb 2003 04:18:01 -0000	1.48
--- manager.py	3 Mar 2003 23:20:24 -0000	1.49
***************
*** 6,9 ****
--- 6,10 ----
  import errno
  import shutil
+ import win32api, win32con
  
  import win32com.client
***************
*** 26,30 ****
      if hasattr(sys, "frozen"):
          if sys.frozen == "dll":
-             import win32api
              this_filename = win32api.GetModuleFileName(sys.frozendllhandle)
          else:
--- 27,30 ----
***************
*** 209,216 ****
          if os.path.isfile(src) and not os.path.isfile(dest):
              if do_move:
!                 shutil.move(src, dest)
              else:
                  shutil.copyfile(src, dest)
!         
      def FormatFolderNames(self, folder_ids, include_sub):
          names = []
--- 209,218 ----
          if os.path.isfile(src) and not os.path.isfile(dest):
              if do_move:
!                 # shutil in 2.2 and earlier does not contain 'move'
!                 win32api.MoveFileEx(src, dest,
!                                     win32con.MOVEFILE_COPY_ALLOWED)
              else:
                  shutil.copyfile(src, dest)
! 
      def FormatFolderNames(self, folder_ids, include_sub):
          names = []





More information about the Spambayes-checkins mailing list