diff options
author | Christian Clauss <cclauss@me.com> | 2021-01-27 15:08:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 15:08:05 +0100 |
commit | 63be8a99401992075c23e99f7c84de1c653e39e2 (patch) | |
tree | 85dc7014316dc27bb9a6da3af4dc01c35ab02219 /scripts | |
parent | 2a51a85aa86abb4c294c65fab57f3d9c69f10080 (diff) | |
download | brotli-63be8a99401992075c23e99f7c84de1c653e39e2.zip brotli-63be8a99401992075c23e99f7c84de1c653e39e2.tar.gz brotli-63be8a99401992075c23e99f7c84de1c653e39e2.tar.bz2 |
unichr was removed in Python 3 because all str are Unicode (#877)
https://python-future.org/compatible_idioms.html#unichr
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/dictionary/step-04-generate-java-literals.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/dictionary/step-04-generate-java-literals.py b/scripts/dictionary/step-04-generate-java-literals.py index fd3c64e..c235f25 100644 --- a/scripts/dictionary/step-04-generate-java-literals.py +++ b/scripts/dictionary/step-04-generate-java-literals.py @@ -15,6 +15,11 @@ # # This script generates literals used in Java code. +try: + unichr # Python 2 +except NameError + unichr = chr # Python 3 + bin_path = "dictionary.bin" with open(bin_path, "rb") as raw: |