Skip to content

Commit b6faecc

Browse files
committed
Use ZLIB_RUNTIME_VERSION if available
1 parent 49c3178 commit b6faecc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: gitdb/stream.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def read(self, size=-1):
294294
# However, the zlib VERSIONs as well as the platform check is used to further match the entries in the
295295
# table in the github issue. This is it ... it was the only way I could make this work everywhere.
296296
# IT's CERTAINLY GOING TO BITE US IN THE FUTURE ... .
297-
if zlib.ZLIB_VERSION in ('1.2.7', '1.2.5') and not sys.platform == 'darwin':
297+
if getattr(zlib, 'ZLIB_RUNTIME_VERSION', zlib.ZLIB_VERSION) in ('1.2.7', '1.2.5') and not sys.platform == 'darwin':
298298
unused_datalen = len(self._zip.unconsumed_tail)
299299
else:
300300
unused_datalen = len(self._zip.unconsumed_tail) + len(self._zip.unused_data)

0 commit comments

Comments
 (0)