diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen_archlist.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/gen_archlist.py b/scripts/gen_archlist.py index 1633dfac..21a196fc 100755 --- a/scripts/gen_archlist.py +++ b/scripts/gen_archlist.py @@ -486,11 +486,14 @@ def main(): }) ALL_CPV_KWS = [] - for i in open(args.file).readlines(): - cp = i[:-1] - if cp.startswith('#') or cp.isspace() or not cp: + for line in open(args.file).readlines(): + cp = line.strip() + + # Filter useless lines + if not cp or cp.startswith('#'): continue - if cp.find('#') is not -1: + + if '#' in cp: raise Exception('Inline comments are not supported') # Convert line to CPV(s) |