diff options
Diffstat (limited to 'git_command.py')
-rw-r--r-- | git_command.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git_command.py b/git_command.py index 4b17f78d..2e4974fa 100644 --- a/git_command.py +++ b/git_command.py | |||
@@ -503,7 +503,8 @@ class GitCommand(object): | |||
503 | A str containing everything read from the in_stream. | 503 | A str containing everything read from the in_stream. |
504 | """ | 504 | """ |
505 | buffer = "" | 505 | buffer = "" |
506 | chunk = in_stream.read1() | 506 | read_size = 1024 if sys.version_info < (3, 7) else -1 |
507 | chunk = in_stream.read1(read_size) | ||
507 | while chunk: | 508 | while chunk: |
508 | # Convert to str. | 509 | # Convert to str. |
509 | if not hasattr(chunk, "encode"): | 510 | if not hasattr(chunk, "encode"): |
@@ -513,7 +514,7 @@ class GitCommand(object): | |||
513 | out_stream.write(chunk) | 514 | out_stream.write(chunk) |
514 | out_stream.flush() | 515 | out_stream.flush() |
515 | 516 | ||
516 | chunk = in_stream.read1() | 517 | chunk = in_stream.read1(read_size) |
517 | 518 | ||
518 | return buffer | 519 | return buffer |
519 | 520 | ||