diff options
author | Helmut Grohne <helmut@subdivi.de> | 2019-02-08 19:21:27 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2019-02-08 19:21:27 +0100 |
commit | c70ed9aa4c8664b0cb41f85469b62daab69eb3f6 (patch) | |
tree | ebc0e40aed9df8194b8f43915998d85a6fbbebbb | |
parent | 4f208bade5eeae098d060b59c27b56fd1d569bdd (diff) | |
download | crossqa-c70ed9aa4c8664b0cb41f85469b62daab69eb3f6.tar.gz |
make depcheck.py compatible with stretch
-rwxr-xr-x | depcheck.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/depcheck.py b/depcheck.py index f1c1a1f..4089ec5 100755 --- a/depcheck.py +++ b/depcheck.py @@ -245,7 +245,8 @@ class DebianMirror: if self.byhash: listname = "%s/by-hash/%s/%s" % (os.path.dirname(listname), self.hashfunc, hashvalue) - with requests.get(self.get_uri(listname), stream=True) as resp: + with contextlib.closing(requests.get(self.get_uri(listname), + stream=True)) as resp: resp.raise_for_status() it = resp.iter_content(65536) it = hash_check(it, hashlib.new(self.hashfunc), hashvalue) |