Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6891caf

Browse files
committed
Can get a str object from stream.read rather then bytes.
Convert to the expected bytes.
1 parent4a5ceba commit6891caf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎git/cmd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,10 @@ def wait(self, stderr=b''):
338338

339339
defread_all_from_possibly_closed_stream(stream):
340340
try:
341-
returnstderr+stream.read()
341+
last_stderr=stream.read()
342+
iftype(last_stderr)==unicode:
343+
last_stderr=last_stderr.encode(defenc)
344+
returnstderr+last_stderr
342345
exceptValueError:
343346
returnstderrorb''
344347

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp