summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2022-12-09 11:11:08 +0100
committerGitHub <noreply@github.com>2022-12-09 11:11:08 +0100
commit8d92aba1e43bbf5b48e3a62dc6cd581d7bfdc1bb (patch)
treee5f455152df99e76626f55e584e2ff12b045e466
parent49c3178711ddb3510f0e96297187f823cc019871 (diff)
parentb6faecc46fcc4f6412149f2021447c0070eba60e (diff)
downloadgitdb-8d92aba1e43bbf5b48e3a62dc6cd581d7bfdc1bb.tar.gz
Merge pull request #84 from otethal/zlib_checkHEADmaster
Use ZLIB_RUNTIME_VERSION if available
-rw-r--r--gitdb/stream.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitdb/stream.py b/gitdb/stream.py
index 222b843..1b5426f 100644
--- a/gitdb/stream.py
+++ b/gitdb/stream.py
@@ -294,7 +294,7 @@ class DecompressMemMapReader(LazyMixin):
# However, the zlib VERSIONs as well as the platform check is used to further match the entries in the
# table in the github issue. This is it ... it was the only way I could make this work everywhere.
# IT's CERTAINLY GOING TO BITE US IN THE FUTURE ... .
- if zlib.ZLIB_VERSION in ('1.2.7', '1.2.5') and not sys.platform == 'darwin':
+ if getattr(zlib, 'ZLIB_RUNTIME_VERSION', zlib.ZLIB_VERSION) in ('1.2.7', '1.2.5') and not sys.platform == 'darwin':
unused_datalen = len(self._zip.unconsumed_tail)
else:
unused_datalen = len(self._zip.unconsumed_tail) + len(self._zip.unused_data)