summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2015-06-12 04:21:01 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2015-06-12 04:21:01 +0200
commitd1eedf6f4e1a8b0a460ed7b3bc2ef7adcbe3a232 (patch)
treec881d457492923888e3e385ac62fc084b676b3a0 /kconfiglib.py
parentbac624610819ad547d47bbe9e7510aa653dcee15 (diff)
Simplify Symbol._make_conf().
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index dcda3e7..fe91a2c 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2520,18 +2520,17 @@ class Symbol(Item):
return ["CONFIG_{0}={1}".format(self.name, val)]
return ["# CONFIG_{0} is not set".format(self.name)]
- elif self.type == INT or self.type == HEX:
+ if self.type == INT or self.type == HEX:
return ["CONFIG_{0}={1}".format(self.name, val)]
- elif self.type == STRING:
+ if self.type == STRING:
# Escape \ and "
return ['CONFIG_{0}="{1}"'
.format(self.name,
val.replace("\\", "\\\\").replace('"', '\\"'))]
- else:
- _internal_error("Internal error while creating .config: unknown "
- 'type "{0}".'.format(self.type))
+ _internal_error("Internal error while creating .config: unknown "
+ 'type "{0}".'.format(self.type))
def _get_dependent(self):
"""Returns the set of symbols that should be invalidated if the value