mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
Reading the raw stream doesn't decode files that are content-encoded, which is true for the 'changes' file from launchpad, so it's saved to disk gzipped which isn't what is expected. Using the python requests iter_content method instead uses the built-in stream decoding that the requests library provides, and saves the file uncompressed/unencoded. Note that since the encoded Content-Length won't match the resulting unencoded actual length of data we save to file, this also turns off the progress bar for any files that have Content-Encoding.