Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6d63f5 commit 9d625c2Copy full SHA for 9d625c2
1 file changed
Lib/gzip.py
@@ -473,8 +473,8 @@ def _test():
473
for arg in args:
474
if decompress:
475
if arg == "-":
476
- f = GzipFile(filename="", mode="rb", fileobj=sys.stdin)
477
- g = sys.stdout
+ f = GzipFile(filename="", mode="rb", fileobj=sys.stdin.buffer)
+ g = sys.stdout.buffer
478
else:
479
if arg[-3:] != ".gz":
480
print("filename doesn't end in .gz:", repr(arg))
@@ -483,8 +483,8 @@ def _test():
483
g = builtins.open(arg[:-3], "wb")
484
485
486
- f = sys.stdin
487
- g = GzipFile(filename="", mode="wb", fileobj=sys.stdout)
+ f = sys.stdin.buffer
+ g = GzipFile(filename="", mode="wb", fileobj=sys.stdout.buffer)
488
489
f = builtins.open(arg, "rb")
490
g = open(arg + ".gz", "wb")
0 commit comments