diff options
Diffstat (limited to 'update-blocker-wiki')
-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 |