Commit 6e9ae2e3 authored by Christophe Dumez's avatar Christophe Dumez

- fixed missing import / class

- improved error messages


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7451 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d1fc8deb
...@@ -271,7 +271,12 @@ ...@@ -271,7 +271,12 @@
from dircache import listdir from dircache import listdir
from shutil import copy from shutil import copy
import os import os, exceptions
class Error(exceptions.EnvironmentError):
""" Simple Exception
"""
pass
def copytree(src, dst, symlinks=False): def copytree(src, dst, symlinks=False):
"""Recursively copy a directory tree using copy(). """Recursively copy a directory tree using copy().
...@@ -303,6 +308,6 @@ def copytree(src, dst, symlinks=False): ...@@ -303,6 +308,6 @@ def copytree(src, dst, symlinks=False):
else: else:
copy(srcname, dstname) copy(srcname, dstname)
except (IOError, os.error), why: except (IOError, os.error), why:
errors.append((srcname, dstname, 'Error: ' + str(why.strerror))) errors.append((srcname, dstname, str(why)))
if errors: if errors:
raise Error, errors raise Error, errors
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment