From 6e9ae2e3f30c400f62e565b57cc821b52d53b6b1 Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe@nexedi.com>
Date: Tue, 23 May 2006 13:19:38 +0000
Subject: [PATCH] - fixed missing import / class - improved error messages

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7451 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/copyTree.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/patches/copyTree.py b/product/ERP5Type/patches/copyTree.py
index 1e70cd2e80..ed611d574f 100644
--- a/product/ERP5Type/patches/copyTree.py
+++ b/product/ERP5Type/patches/copyTree.py
@@ -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 @@ def copytree(src, dst, symlinks=False):
       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
\ No newline at end of file
-- 
2.30.9