Skip to content

Commit

Permalink
Oops (didn't fully test etag checking)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolever committed Mar 6, 2019
1 parent 70337ef commit d543fb2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.3.1 (2019-03-06)
* Computers are hard (didn't fully test etag checking)

0.3.0 (2019-03-06)
* Fix downloading compressed JPEGs (see "Note 2" in README)
* Better retrying on rate limit errors
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name="wayslack",
version="0.3.0",
version="0.3.1",
url="https://github.com/wolever/wayslack",
author="David Wolever",
author_email="[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion wayslack.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def _downloader(self, item):
for chunk in res.iter_content(4096):
hash.update(chunk)
f.write(chunk)
if hash.hexdigest() != res.headers["etag"]:
if hash.hexdigest() != res.headers["etag"].strip('"'):
raise Exception("Downloading %r: checksum does not match. etag %r != md5 %r\n" %(
url,
res.headers["etag"],
Expand Down

0 comments on commit d543fb2

Please sign in to comment.