summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/path.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2015-06-16 20:57:06 +1000
committerChris Johns <chrisj@rtems.org>2015-06-16 20:57:06 +1000
commit5b5d6bff74fed9da7626805620670cfd22970c2f (patch)
tree1678f1f5e6e2dd3d5c903f89495b8f1ecc697f36 /source-builder/sb/path.py
parentdevel/qemu: Add support to build VDE if installed. (diff)
downloadrtems-source-builder-5b5d6bff74fed9da7626805620670cfd22970c2f.tar.bz2
sb: Fix the downloader file:// URL to copy the file to the local path.
Diffstat (limited to 'source-builder/sb/path.py')
-rw-r--r--source-builder/sb/path.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index 5fa8aef..824b8f5 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -167,6 +167,18 @@ def expand(name, paths):
l += [join(p, name)]
return l
+def copy(src, dst):
+ hsrc = host(src)
+ hdst = host(dst)
+ try:
+ shutil.copy(hsrc, hdst)
+ except OSError, why:
+ if windows:
+ if WindowsError is not None and isinstance(why, WindowsError):
+ pass
+ else:
+ raise error.general('copying tree: %s -> %s: %s' % (hsrc, hdst, str(why)))
+
def copy_tree(src, dst):
trace = False