diff options
author | James Laska <jlaska@redhat.com> | 2011-04-06 15:17:33 -0400 |
---|---|---|
committer | James Laska <jlaska@redhat.com> | 2011-04-06 15:17:33 -0400 |
commit | 517413719323fe901b27779aab2845243c1952d2 (patch) | |
tree | 43d12a3377026ccd1fd747310fe7a0b39302a396 | |
parent | 1b282edae37f39fdb26c6517e916f5e17b45d335 (diff) | |
download | scripts-517413719323fe901b27779aab2845243c1952d2.tar.gz scripts-517413719323fe901b27779aab2845243c1952d2.tar.xz scripts-517413719323fe901b27779aab2845243c1952d2.zip |
Update detection of empty/comment lines.
-rwxr-xr-x | update-blocker-wiki | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/update-blocker-wiki b/update-blocker-wiki index 06e9c7e..3afef15 100755 --- a/update-blocker-wiki +++ b/update-blocker-wiki @@ -4,6 +4,7 @@ import os import sys import locale import optparse +import re from getpass import getpass try: @@ -103,9 +104,9 @@ def parse_args(): buf = fd.read() fd.close() valid = False - # Any non-empty non-comment line is good for line in buf.split('\n'): - if line.startswith('#') or len(line) == 0: + # Skip empty lines or lines with only comments + if re.match(r'^(\s*#|\s*$)', line): continue return True |