summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2015-06-08 10:39:57 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2015-06-08 10:39:57 +0200
commit986d703db3b87419caffc1c427aa2cc63db28b37 (patch)
tree77a4f1c221433fdcc274a1119669519743402319 /kconfiglib.py
parentdd76df91dfda48ecc02c82b29a4fc6a379c660e9 (diff)
Compactify get_defconfig_filename().
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 6f33a64..8badb0d 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -424,23 +424,18 @@ class Config(object):
match what 'make defconfig' would use. That probably ought to be worked
around somehow, so that this function always gives the "expected"
result."""
-
if self.defconfig_sym is None:
return None
-
for filename, cond_expr in self.defconfig_sym.def_exprs:
if self._eval_expr(cond_expr) == "y":
filename = self._expand_sym_refs(filename)
-
# We first look in $srctree. os.path.join() won't work here as
# an absolute path in filename would override $srctree.
srctree_filename = os.path.normpath(self.srctree + "/" + filename)
if os.path.exists(srctree_filename):
return srctree_filename
-
if os.path.exists(filename):
return filename
-
return None
def get_symbol(self, name):