summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/git/cmd.py b/git/cmd.py
index aa711168..ebf2bd75 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -59,7 +59,8 @@ __all__ = ('Git',)
# Documentation
## @{
-def handle_process_output(process, stdout_handler, stderr_handler, finalizer, decode_streams=True):
+def handle_process_output(process, stdout_handler, stderr_handler,
+ finalizer=None, decode_streams=True):
"""Registers for notifications to lean that process output is ready to read, and dispatches lines to
the respective line handlers.
This function returns once the finalizer returns
@@ -108,10 +109,13 @@ def handle_process_output(process, stdout_handler, stderr_handler, finalizer, de
t.start()
threads.append(t)
+ ## FIXME: Why Join?? Will block if `stdin` needs feeding...
+ #
for t in threads:
t.join()
- return finalizer(process)
+ if finalizer:
+ return finalizer(process)
def dashify(string):