aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Aiuto <aiuto@google.com>2021-06-09 14:58:06 -0400
committerTony Aiuto <aiuto@google.com>2021-06-09 14:58:06 -0400
commit550c1c557b4db4b987ce940ac4c9e82bbf13b498 (patch)
tree68c559993e22db056ae85d7cdd03c867b02d12ec
parenta40563d6ea1ea5d6745762bc04eb3f07d14e3fb2 (diff)
downloadbazelbuild-rules_license-550c1c557b4db4b987ce940ac4c9e82bbf13b498.tar.gz
remove obsolete UTF-8 hack required by Bazel before 4.x
-rw-r--r--tools/checker_demo.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/checker_demo.py b/tools/checker_demo.py
index 0b57cee..32ec5f9 100644
--- a/tools/checker_demo.py
+++ b/tools/checker_demo.py
@@ -28,12 +28,7 @@ _ALWAYS_ALLOWED_CONDITIONS = frozenset(['notice', 'permissive', 'unencumberd'])
def _get_licenses(licenses_info):
with codecs.open(licenses_info, encoding='utf-8') as licenses_file:
- # TODO(aiuto): Bazel is not parsing the BUILD file as utf-8, so it is
- # double encoding characters. We should use the line below, but we have
- # to hack up a double utf-8 decode.
- # return json.loads(licenses_file.read())
- b = bytearray([ord(c) for c in licenses_file.read()])
- return json.loads(b.decode('utf-8'))
+ return json.loads(licenses_file.read())
def _do_report(out, licenses):