From: Stephen Finucane Date: Thu, 13 Apr 2017 20:48:21 +0000 (+0100) Subject: Capture stderr for 'git describe' X-Git-Tag: v2.0.0-rc1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2066b0630376c0275c05ea5c18e65465bd71f9cf;p=thirdparty%2Fpatchwork.git Capture stderr for 'git describe' Capture the error messages thrown if git is not installed. Signed-off-by: Stephen Finucane Fixes: 7b07b71e ("templates: Add Patchwork version") --- diff --git a/patchwork/version.py b/patchwork/version.py index e38f50cd..16b7f617 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 ''