diff options
author | Ondrej Tethal <ondrej.tethal@oracle.com> | 2022-12-09 10:21:58 +0100 |
---|---|---|
committer | Ondrej Tethal <ondrej.tethal@oracle.com> | 2022-12-09 10:21:58 +0100 |
commit | b6faecc46fcc4f6412149f2021447c0070eba60e (patch) | |
tree | e5f455152df99e76626f55e584e2ff12b045e466 | |
parent | 49c3178711ddb3510f0e96297187f823cc019871 (diff) | |
download | gitdb-b6faecc46fcc4f6412149f2021447c0070eba60e.tar.gz |
Use ZLIB_RUNTIME_VERSION if available
-rw-r--r-- | gitdb/stream.py | 2 |
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) |