diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-06-18 20:00:49 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-06-18 20:00:49 +0200 |
| commit | 2932ce58d36f3fdff7efb87ec409a26edafad23d (patch) | |
| tree | 48758f3179058e63e39681f2d52e71723f726421 | |
| parent | 50346ba0cc0ae68d3093256dcf66fce6d4ec587f (diff) | |
Fix strange python 3 incompatibilities.
| -rwxr-xr-x | scripts/update-language-subtags | 4 |
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:] |
