summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2019-09-26 12:43:03 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2019-09-26 12:43:03 +0200
commit7d05084b7ef4b3dd88ea365bf1e2364d75da57ba (patch)
tree64d69631bab91dbb8a0fcf624aca74980406216b
parent4185b0b3193345f793ca7a5268fb67ab65e57655 (diff)
Simplify _expand_name_iter() a tiny bit
Get rid of the 'else'.
-rw-r--r--kconfiglib.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index ecf9726..54d35e5 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2603,10 +2603,9 @@ class Kconfig(object):
while 1:
match = _name_special_search(s, i)
- if match.group() == "$(":
- s, i = self._expand_macro(s, match.start(), ())
- else:
+ if match.group() != "$(":
return (s, match.start())
+ s, i = self._expand_macro(s, match.start(), ())
def _expand_str(self, s, i):
# Expands a quoted string starting at index 'i' in 's'. Handles both