summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/macros.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-05-01 06:29:12 +1000
committerChris Johns <chrisj@rtems.org>2013-05-01 06:29:12 +1000
commit84924e4e527ff0799859b3748cce6069dbea6cc9 (patch)
tree73f350f60da1ec49438eba7a40b98a9f14355560 /source-builder/sb/macros.py
parentProduce a better error message if the host support code does not load. (diff)
downloadrtems-source-builder-84924e4e527ff0799859b3748cce6069dbea6cc9.tar.bz2
Fix the open calls to use a host path.
Diffstat (limited to 'source-builder/sb/macros.py')
-rw-r--r--source-builder/sb/macros.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/source-builder/sb/macros.py b/source-builder/sb/macros.py
index 1c46ec8..200dabb 100644
--- a/source-builder/sb/macros.py
+++ b/source-builder/sb/macros.py
@@ -334,14 +334,15 @@ class macros:
for n in names:
if path.exists(n):
try:
- mc = open(n, 'r')
+ mc = open(path.host(n), 'r')
macros = self.parse(mc)
mc.close()
self.files += [n]
return
except IOError, err:
pass
- raise error.general('opening macro file: %s' % (path.host(name)))
+ raise error.general('opening macro file: %s' % \
+ (path.host(self.expand(name))))
def get(self, key):
if type(key) is not str: