apibuild: Use list comprehension insteand of map

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
Radostin Stoyanov 2018-03-20 06:49:04 +00:00 committed by Daniel P. Berrangé
parent d2e226df5c
commit c3e611927c

View File

@ -471,8 +471,7 @@ class CLexer:
return None
if line[0] == '#':
self.tokens = list(map((lambda x: ('preproc', x)),
line.split()))
self.tokens = [('preproc', word) for word in line.split()]
# We might have whitespace between the '#' and preproc
# macro name, so instead of having a single token element