diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-15 09:42:23 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-16 08:25:30 +0000 |
commit | 2a6f739f1d3a0383d849cb2944c69797b4b3e437 (patch) | |
tree | 1b6df132dfba8e31bfd25924982052f0da5c3b8b /bitbake/lib/bb/parse/parse_py | |
parent | 5c9e2b2f435d6f4f72962370ef3b403bb3d1d883 (diff) | |
download | poky-2a6f739f1d3a0383d849cb2944c69797b4b3e437.tar.gz |
bitbake: ConfHandler: Clean up bogus imports
The import statements here are plain bizarre. Remove them, tweaking
some of the function calls to match current practices. I can't find any
reason these old imports are as they are.
(Bitbake rev: 4c2f1fe51a13ddc97e518327714292af46b9e1ab)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 9d592f7261..861faf0e76 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -27,7 +27,7 @@ | |||
27 | import re, os | 27 | import re, os |
28 | import logging | 28 | import logging |
29 | import bb.utils | 29 | import bb.utils |
30 | from bb.parse import ParseError, resolve_file, ast, logger | 30 | from bb.parse import ParseError, resolve_file, ast, logger, handle |
31 | 31 | ||
32 | __config_regexp__ = re.compile( r""" | 32 | __config_regexp__ = re.compile( r""" |
33 | ^ | 33 | ^ |
@@ -75,7 +75,6 @@ def include(parentfn, fn, lineno, data, error_out): | |||
75 | if parentfn == fn: # prevent infinite recursion | 75 | if parentfn == fn: # prevent infinite recursion |
76 | return None | 76 | return None |
77 | 77 | ||
78 | import bb | ||
79 | fn = data.expand(fn) | 78 | fn = data.expand(fn) |
80 | parentfn = data.expand(parentfn) | 79 | parentfn = data.expand(parentfn) |
81 | 80 | ||
@@ -84,17 +83,16 @@ def include(parentfn, fn, lineno, data, error_out): | |||
84 | bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True)) | 83 | bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True)) |
85 | abs_fn, attempts = bb.utils.which(bbpath, fn, history=True) | 84 | abs_fn, attempts = bb.utils.which(bbpath, fn, history=True) |
86 | if abs_fn and bb.parse.check_dependency(data, abs_fn): | 85 | if abs_fn and bb.parse.check_dependency(data, abs_fn): |
87 | bb.warn("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True))) | 86 | logger.warn("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True))) |
88 | for af in attempts: | 87 | for af in attempts: |
89 | bb.parse.mark_dependency(data, af) | 88 | bb.parse.mark_dependency(data, af) |
90 | if abs_fn: | 89 | if abs_fn: |
91 | fn = abs_fn | 90 | fn = abs_fn |
92 | elif bb.parse.check_dependency(data, fn): | 91 | elif bb.parse.check_dependency(data, fn): |
93 | bb.warn("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True))) | 92 | logger.warn("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True))) |
94 | 93 | ||
95 | from bb.parse import handle | ||
96 | try: | 94 | try: |
97 | ret = handle(fn, data, True) | 95 | ret = bb.parse.handle(fn, data, True) |
98 | except (IOError, OSError): | 96 | except (IOError, OSError): |
99 | if error_out: | 97 | if error_out: |
100 | raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), parentfn, lineno) | 98 | raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), parentfn, lineno) |