summaryrefslogtreecommitdiff
path: root/tools/warn/java_warn_patterns.py
diff options
context:
space:
mode:
author Tao Bao <tbao@google.com> 2019-06-18 16:29:37 -0700
committer Tao Bao <tbao@google.com> 2019-06-18 23:53:53 -0700
commitc1a1ec30df41635336433fea51f102c44ea17ccf (patch)
treecc11f7dba524994835d24181ba3a9cde56990b1f /tools/warn/java_warn_patterns.py
parente346d8c25e8bc568db0f00da31cf52433c5b7a7e (diff)
releasetools: Make common.ZipWriteStr Python 3 compatible.
Python 2 and 3 behave differently when calling ZipFile.writestr() with zinfo.external_attr being 0. Python 3 uses `0o600 << 16` as the value for such a case (since https://github.com/python/cpython/commit/18ee29d0b870caddc0806916ca2c823254f1a1f9), which seems to make more sense. Otherwise the entry will end up with 0o000 as the permission bits. This CL updates common.ZipWriteStr to follow the logic in Python 3, in order to get consistent behavior between using the two versions. Bug: 131631303 Test: `python -m unittest test_common.CommonZipTest` Test: `python3 -m unittest test_common.CommonZipTest` Change-Id: If8429855d922ef1ad76591f703215a0ce5089f0f
Diffstat (limited to 'tools/warn/java_warn_patterns.py')
0 files changed, 0 insertions, 0 deletions