summaryrefslogtreecommitdiffstats
path: root/lib/bb/parse/__init__.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-04 13:10:00 -0700
committerChris Larson <chris_larson@mentor.com>2010-06-04 13:11:07 -0700
commit1cfcbee014478eb129ed382c13622317412b036e (patch)
treed85b75085006142d2d4cb4e1331879ee541d225c /lib/bb/parse/__init__.py
parentb786f1f60fb50565295e7c8e979b471327d924f3 (diff)
downloadbitbake-contrib-1cfcbee014478eb129ed382c13622317412b036e.tar.gz
Make the file not found error actually useable.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/parse/__init__.py')
-rw-r--r--lib/bb/parse/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
index 4b957884c..fc06841d3 100644
--- a/lib/bb/parse/__init__.py
+++ b/lib/bb/parse/__init__.py
@@ -81,9 +81,11 @@ def init(fn, data):
def resolve_file(fn, d):
if not os.path.isabs(fn):
- fn = bb.utils.which(bb.data.getVar("BBPATH", d, 1), fn)
- if not fn:
- raise IOError("file %s not found" % fn)
+ bbpath = bb.data.getVar("BBPATH", d, True)
+ newfn = bb.which(bbpath, fn)
+ if not newfn:
+ raise IOError("file %s not found in %s" % (fn, bbpath))
+ fn = newfn
bb.msg.debug(2, bb.msg.domain.Parsing, "LOAD %s" % fn)
return fn