[Erp5-report] r7451 - /erp5/trunk/products/ERP5Type/patches/copyTree.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 23 15:19:39 CEST 2006


Author: chris
Date: Tue May 23 15:19:38 2006
New Revision: 7451

URL: http://svn.erp5.org?rev=7451&view=rev
Log:
- fixed missing import / class
- improved error messages

Modified:
    erp5/trunk/products/ERP5Type/patches/copyTree.py

Modified: erp5/trunk/products/ERP5Type/patches/copyTree.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/copyTree.py?rev=7451&r1=7450&r2=7451&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/copyTree.py (original)
+++ erp5/trunk/products/ERP5Type/patches/copyTree.py Tue May 23 15:19:38 2006
@@ -271,7 +271,12 @@
 
 from dircache import listdir
 from shutil import copy
-import os
+import os, exceptions
+
+class Error(exceptions.EnvironmentError):
+  """ Simple Exception
+  """
+  pass
 
 def copytree(src, dst, symlinks=False):
   """Recursively copy a directory tree using copy().
@@ -303,6 +308,6 @@
       else:
         copy(srcname, dstname)
     except (IOError, os.error), why:
-      errors.append((srcname, dstname, 'Error: ' + str(why.strerror)))
+      errors.append((srcname, dstname, str(why)))
   if errors:
     raise Error, errors




More information about the Erp5-report mailing list