From b3f3e6d718736c5838f6f034d7cf2e0c2bf4ba4d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Sun, 2 Apr 2017 08:43:44 +0200 Subject: lexed_tokens(): Deduplicate do part in do-while --- configure.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'configure.py') diff --git a/configure.py b/configure.py index d9a9cce86..22fea5d38 100755 --- a/configure.py +++ b/configure.py @@ -543,10 +543,12 @@ def lex_me_harder(infofile, allowed_groups, name_val_pairs): out.__dict__[key] = val def lexed_tokens(): # Convert to an interator - token = lexer.get_token() - while token != None: - yield token + while True: token = lexer.get_token() + if token != lexer.eof: + yield token + else: + return for token in lexed_tokens(): match = re.match('<(.*)>', token) -- cgit v1.2.3