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

Commite316575

Browse files
committed
pumps: FIX don't pump when proc has no streams
1 parentc3c170c commite316575

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎git/cmd.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,16 @@ def pump_stream(cmdline, name, stream, is_decode, handler):
9292
cmdline=getattr(process,'args','')# PY3+ only
9393
ifnotisinstance(cmdline, (tuple,list)):
9494
cmdline=cmdline.split()
95+
96+
pumps= []
97+
ifprocess.stdout:
98+
pumps.append(('stdout',process.stdout,stdout_handler))
99+
ifprocess.stderr:
100+
pumps.append(('stderr',process.stderr,stderr_handler))
101+
95102
threads= []
96-
forname,stream,handlerin (
97-
('stdout',process.stdout,stdout_handler),
98-
('stderr',process.stderr,stderr_handler),
99-
):
103+
104+
forname,stream,handlerinpumps:
100105
t=threading.Thread(target=pump_stream,
101106
args=(cmdline,name,stream,decode_streams,handler))
102107
t.setDaemon(True)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp