From 5c87d684de6b5ab97de1705f8a6963c4fe2c904b Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Fri, 26 Dec 2014 01:32:21 -0500 Subject: [PATCH] Fix failing py 3.x builds thanks to constants generation script by removing filter call Signed-off-by: Ian Bell --- wrappers/Python/generate_constants_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrappers/Python/generate_constants_module.py b/wrappers/Python/generate_constants_module.py index 3e6ea9ad..ee26f1d0 100644 --- a/wrappers/Python/generate_constants_module.py +++ b/wrappers/Python/generate_constants_module.py @@ -20,7 +20,7 @@ def params_constants(enum_key): if not entries: raise ValueError('Unable to find '+enum_key) lines = entries.split('\n') - lines = filter(lambda line: not line.strip().startswith('//') and line, lines)[:] + lines = [line for line in lines if not line.strip().startswith('//')] for i,line in enumerate(lines): if line.find('/'): @@ -29,7 +29,7 @@ def params_constants(enum_key): # Chomp all the whitespace, split at commas keys = ''.join(lines).replace(' ','').split(',') - keys = filter(lambda k: k, keys) + keys = [k for k in keys if k] return keys