summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/path.py
diff options
context:
space:
mode:
Diffstat (limited to 'source-builder/sb/path.py')
-rw-r--r--source-builder/sb/path.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index 824b8f5..df76634 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -201,7 +201,11 @@ def copy_tree(src, dst):
if not os.path.isdir(hdst):
if trace:
print ' mkdir: %s' % (hdst)
- os.makedirs(hdst)
+ try:
+ os.makedirs(hdst)
+ except OSError, why:
+ raise error.general('copying tree: cannot create target directory %s: %s' % \
+ (hdst, str(why)))
for name in names:
srcname = host(os.path.join(hsrc, name))