summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-18 20:00:49 +0200
committerCarl Hetherington <cth@carlh.net>2021-06-18 20:00:49 +0200
commit2932ce58d36f3fdff7efb87ec409a26edafad23d (patch)
tree48758f3179058e63e39681f2d52e71723f726421 /scripts
parent50346ba0cc0ae68d3093256dcf66fce6d4ec587f (diff)
Fix strange python 3 incompatibilities.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update-language-subtags4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/update-language-subtags b/scripts/update-language-subtags
index 3ea53572..20db5219 100755
--- a/scripts/update-language-subtags
+++ b/scripts/update-language-subtags
@@ -10,7 +10,7 @@ lists = {}
with urllib.request.urlopen('https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry') as f:
#with open('language-subtag-registry', 'r') as f:
for l in f.readlines():
- if l.strip().decode('utf-8') == "%%":
+ if l.strip() == "%%":
if 'Type' in block:
if block['Type'] in ['language', 'variant', 'region', 'script', 'extlang']:
if not block['Type'] in lists:
@@ -23,7 +23,7 @@ with urllib.request.urlopen('https://www.iana.org/assignments/language-subtag-re
print("Unknown type `%s'" % block['Type'])
block = {}
else:
- p = l.strip().decode('utf-8').split(':')
+ p = l.strip().split(':')
if len(p) > 1:
key = p[0]
value = p[1][1:]