Fix python3 UTF-8 runtime error and section detection
This commit is contained in:
parent
568394438d
commit
36609787d5
2
list
2
list
|
@ -1 +1 @@
|
|||
Subproject commit 24caf4f72bf42a87559685e7211796c94855a90c
|
||||
Subproject commit 1f3ad51171235aafe423435606e869f0161582e4
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue