diff options
author | Zhuowei Zhang <zhuoweizhang@yahoo.com> | 2020-01-26 10:50:35 -0500 |
---|---|---|
committer | Zhuowei Zhang <zhuoweizhang@yahoo.com> | 2020-01-26 10:50:35 -0500 |
commit | 634a1127c077542083c9e11f8284cfe92c634c7c (patch) | |
tree | 27d3a56a62d25eb1f9bfe29a8533c3cce17c67e0 /components/script | |
parent | 7596a0fc1a6cd5880c12d3a785236ea4d71f0be7 (diff) | |
download | servo-634a1127c077542083c9e11f8284cfe92c634c7c.tar.gz servo-634a1127c077542083c9e11f8284cfe92c634c7c.zip |
mach: fix `bootstrap-android` on Python 3
When running `python3 ./mach bootstrap-android`, this error occurs:
```
AttributeError: 'HTTPMessage' object has no attribute 'getheader'
File "/servo/python/servo/bootstrap_commands.py", line 136, in bootstrap_android
download("sdk", tools.format(system=system))
File "/servo/python/servo/bootstrap_commands.py", line 117, in download
download_file(filename, url, archive)
File "/servo/python/servo/util.py", line 170, in download_file
download(desc, src, fd)
File "/servo/python/servo/util.py", line 110, in download
if resp.info().getheader('Content-Length'):
```
Use the `get()` function instead, which exists in both Python 3 and 2
(where it is a synonym for `getheader()`).
Fixes #25616.
Diffstat (limited to 'components/script')
0 files changed, 0 insertions, 0 deletions