summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/download.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2015-02-07 17:58:17 +1100
committerChris Johns <chrisj@rtems.org>2015-02-07 17:58:17 +1100
commitd4eb08f55a7e868ea0e61dee03c216cdf7a3502b (patch)
tree9f98bea8a291aeb38ab93b2efb2c9865db1defae /source-builder/sb/download.py
parentUpdate all 4.11 archs to newlib-2.2.0-1 and gdb-7.8.2 where possible. (diff)
downloadrtems-source-builder-d4eb08f55a7e868ea0e61dee03c216cdf7a3502b.tar.bz2
Windows native build fixes.
The testing of building on Windows is done using MSYS2.
Diffstat (limited to 'source-builder/sb/download.py')
-rw-r--r--source-builder/sb/download.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index dc1def6..9490aa0 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -69,7 +69,7 @@ def _hash_check(file_, absfile, macros, remove = True):
_in = None
try:
hasher = hashlib.new(hash[0])
- _in = open(absfile, 'rb')
+ _in = open(path.host(absfile), 'rb')
hasher.update(_in.read())
except IOError, err:
log.notice('hash: %s: read error: %s' % (file_, str(err)))
@@ -90,7 +90,12 @@ def _hash_check(file_, absfile, macros, remove = True):
if failed and remove:
log.warning('removing: %s' % (file_))
if path.exists(absfile):
- os.remove(path.host(absfile))
+ try:
+ os.remove(path.host(absfile))
+ except IOError, err:
+ raise error.general('hash: %s: remove: %s' % (absfile, str(err)))
+ except:
+ raise error.general('hash: %s: remove error' % (file_))
if hasher is not None:
del hasher
else: