Merge pull request #257 from mcmasterg/parse_db_line

parse_db_line: looser validation
This commit is contained in:
John McMaster 2018-11-13 15:02:34 -08:00 committed by GitHub
commit b0b9095b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -88,6 +88,7 @@ def parse_db_line(line):
# Ex: !30_06 !30_08 !30_11 30_07
bits = frozenset(parts[1:])
for bit in bits:
assert re.match(
r'[!]*[0-9][0-9]_[0-9][0-9]', bit), "Invalid bit: %s" % bit
# 19_39
# 100_319
assert re.match(r'[!]*[0-9]+_[0-9]+', bit), "Invalid bit: %s" % bit
return tag, bits, None