summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-04 13:10:00 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:35 +0100
commit9d32ff0c87b5cbf420efb0fd8ce5d7182863b634 (patch)
tree22437367e872e073100d0188b69c773e310c9e10
parent85ca18f60a540354e4b2ba27d29b0270c1ec8d7f (diff)
downloadpoky-9d32ff0c87b5cbf420efb0fd8ce5d7182863b634.tar.gz
Make the file not found error actually useable.
(Bitbake rev: 1cfcbee014478eb129ed382c13622317412b036e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--bitbake/lib/bb/parse/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py
index 4b957884cc..fc06841d3f 100644
--- a/bitbake/lib/bb/parse/__init__.py
+++ b/bitbake/lib/bb/parse/__init__.py
@@ -81,9 +81,11 @@ def init(fn, data):
81 81
82def resolve_file(fn, d): 82def resolve_file(fn, d):
83 if not os.path.isabs(fn): 83 if not os.path.isabs(fn):
84 fn = bb.utils.which(bb.data.getVar("BBPATH", d, 1), fn) 84 bbpath = bb.data.getVar("BBPATH", d, True)
85 if not fn: 85 newfn = bb.which(bbpath, fn)
86 raise IOError("file %s not found" % fn) 86 if not newfn:
87 raise IOError("file %s not found in %s" % (fn, bbpath))
88 fn = newfn
87 89
88 bb.msg.debug(2, bb.msg.domain.Parsing, "LOAD %s" % fn) 90 bb.msg.debug(2, bb.msg.domain.Parsing, "LOAD %s" % fn)
89 return fn 91 return fn