summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-02 14:24:28 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-02 14:30:02 +0200
commitdf5c1cb715664fd7a98160844572cc473cb6b87c (patch)
tree3844da31fa8a15c0b2ab687038911ec0f5a75b61
parentb3b9c0242ba2893231e0ab1c13fa2a0c8a9cfc59 (diff)
downloadgitpython-df5c1cb715664fd7a98160844572cc473cb6b87c.tar.gz
FIX regression by #519 on reading stdout/stderr of cmds
-rw-r--r--.appveyor.yml3
-rw-r--r--git/cmd.py3
-rw-r--r--git/repo/base.py8
3 files changed, 10 insertions, 4 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 47bd1f0b..df957c20 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -38,9 +38,10 @@ environment:
install:
- set PATH=%PYTHON%;%PYTHON%\Scripts;%GIT_PATH%;%PATH%
- ## Print architecture, python & git used for debugging.
+ ## Print configuration for debugging.
#
- |
+ echo %PATH%
uname -a
where git git-daemon python pip pip3 pip34
python --version
diff --git a/git/cmd.py b/git/cmd.py
index f4f5f99a..88d62aa4 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -539,7 +539,8 @@ class Git(LazyMixin):
cmd_not_found_exception = OSError
# end handle
- log.debug("Popen(%s, cwd=%s, universal_newlines=%s", command, cwd, universal_newlines)
+ log.debug("Popen(%s, cwd=%s, universal_newlines=%s, shell=%s)",
+ command, cwd, universal_newlines, shell)
try:
proc = Popen(command,
env=env,
diff --git a/git/repo/base.py b/git/repo/base.py
index 947d77d2..26753bab 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -899,8 +899,12 @@ class Repo(object):
try:
proc = git.clone(url, path, with_extended_output=True, as_process=True,
v=True, **add_progress(kwargs, git, progress))
- progress_handler = progress and progress.new_message_handler() or None
- handle_process_output(proc, None, progress_handler, finalize_process)
+ if progress:
+ handle_process_output(proc, None, progress.new_message_handler(), finalize_process)
+ else:
+ (stdout, stderr) = proc.communicate() # FIXME: Will block of outputs are big!
+ finalize_process(proc, stderr=stderr)
+ # end handle progress
finally:
if prev_cwd is not None:
os.chdir(prev_cwd)