summaryrefslogtreecommitdiffstats
path: root/lib/bb/parse
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-15 09:42:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-15 09:45:59 +0000
commit4c2f1fe51a13ddc97e518327714292af46b9e1ab (patch)
tree4f73f254fd51960cb04934f7f9934238311631c3 /lib/bb/parse
parentfc70ed596703a1aa954223b169d4ad51193a6ec1 (diff)
downloadopenembedded-core-contrib-4c2f1fe51a13ddc97e518327714292af46b9e1ab.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse')
-rw-r--r--lib/bb/parse/parse_py/ConfHandler.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py
index 9d592f7261..861faf0e76 100644
--- a/lib/bb/parse/parse_py/ConfHandler.py
+++ b/lib/bb/parse/parse_py/ConfHandler.py
@@ -27,7 +27,7 @@
import re, os
import logging
import bb.utils
-from bb.parse import ParseError, resolve_file, ast, logger
+from bb.parse import ParseError, resolve_file, ast, logger, handle
__config_regexp__ = re.compile( r"""
^
@@ -75,7 +75,6 @@ def include(parentfn, fn, lineno, data, error_out):
if parentfn == fn: # prevent infinite recursion
return None
- import bb
fn = data.expand(fn)
parentfn = data.expand(parentfn)
@@ -84,17 +83,16 @@ def include(parentfn, fn, lineno, data, error_out):
bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True))
abs_fn, attempts = bb.utils.which(bbpath, fn, history=True)
if abs_fn and bb.parse.check_dependency(data, abs_fn):
- bb.warn("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True)))
+ logger.warn("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True)))
for af in attempts:
bb.parse.mark_dependency(data, af)
if abs_fn:
fn = abs_fn
elif bb.parse.check_dependency(data, fn):
- bb.warn("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True)))
+ logger.warn("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True)))
- from bb.parse import handle
try:
- ret = handle(fn, data, True)
+ ret = bb.parse.handle(fn, data, True)
except (IOError, OSError):
if error_out:
raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), parentfn, lineno)