Fixed documentation and error message to match the actual code.

This commit is contained in:
Olle Liljenzin 2016-11-06 15:31:18 +01:00 committed by Tim Rühsen
parent 514aa0163c
commit 3a4dff8805
1 changed files with 2 additions and 2 deletions

View File

@ -519,10 +519,10 @@ def parse_psl2c(infile, utf_mode):
for line in lines:
if line[-3:-1] != ', ':
raise InputError('Expected "domainname, <digit>", found "%s"' % line)
# Technically the DAFSA format could support return values in range [0-31],
# Technically the DAFSA format could support return values in range [0x00-0x1E],
# but the values below are the only with a defined meaning.
if line[-1] not in '0123456789ABCDEF':
raise InputError('Expected value to be one of {0,1,2,4,5}, found "%s"' % line[-1])
raise InputError('Expected value to be in range [0-9] or [A-F], found "%s"' % line[-1])
# with open("gperf.out", 'w') as outfile:
# for line in sorted(lines):