Skip to content

Commit 034fc87

Browse files
committed
fix zipopen failure with binary file mode
1 parent dd17769 commit 034fc87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pypop/utils/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def zipopen(path, mode="rt"):
2121
mode = "{}t".format(mode)
2222

2323
try:
24-
if gzip.open(path, mode=mode).readline():
24+
if gzip.open(path, mode=mode).read(1):
2525
return gzip.open(path, mode=mode)
2626
except OSError:
2727
return open(path, mode=mode)

0 commit comments

Comments
 (0)