From 7d05084b7ef4b3dd88ea365bf1e2364d75da57ba Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 26 Sep 2019 12:43:03 +0200 Subject: Simplify _expand_name_iter() a tiny bit Get rid of the 'else'. --- kconfiglib.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'kconfiglib.py') 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 -- cgit v1.2.3