[PATCH] Capture stderr for 'git describe'

Stephen Finucane stephen at that.guru
Fri Apr 14 06:48:21 AEST 2017


Capture the error messages thrown if git is not installed.

Signed-off-by: Stephen Finucane <stephen at that.guru>
Fixes: 7b07b71e ("templates: Add Patchwork version")
---
 patchwork/version.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/patchwork/version.py b/patchwork/version.py
index e38f50c..16b7f61 100644
--- a/patchwork/version.py
+++ b/patchwork/version.py
@@ -56,6 +56,7 @@ def get_raw_git_version():
     """Returns the raw git version via 'git-describe'."""
     try:
         git_version = subprocess.check_output(['git', 'describe'],
+                                              stderr=subprocess.STDOUT,
                                               cwd=ROOT_DIR)
     except (OSError, subprocess.CalledProcessError):
         return ''
-- 
2.9.3



More information about the Patchwork mailing list