Fix python3 UTF-8 runtime error and section detection

This commit is contained in:
Tim Rühsen 2016-02-08 09:40:43 +01:00
parent 568394438d
commit 36609787d5
2 changed files with 6 additions and 3 deletions

2
list

@ -1 +1 @@
Subproject commit 24caf4f72bf42a87559685e7211796c94855a90c
Subproject commit 1f3ad51171235aafe423435606e869f0161582e4

View File

@ -133,7 +133,7 @@ def lint_psl(infile):
elif line[3:9] == "===END":
error('Unexpected end of section')
elif section == PSL_FLAG_PRIVATE:
if line == "// ===END ICANN DOMAINS===":
if line == "// ===END PRIVATE DOMAINS===":
section = 0
elif line[3:11] == "===BEGIN":
error('Unexpected begin of section')
@ -174,7 +174,10 @@ def lint_psl(infile):
labels = line.split('.')
# collect reversed list of labels
if sys.version_info[0] < 3:
group.append(list(reversed(line.encode('utf-8').split('.'))))
else:
group.append(list(reversed(line.split('.'))))
for label in labels:
if not label: