From 029044826668b347cd1d84c4490dc8cb9ca6ac1e Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Wed, 4 Sep 2013 17:55:06 -0700 Subject: [PATCH] Redirect stderr for git rev-parse If not in a git directory the git warning messages will be printed. These warnings shouldn't be shown to users and can make things confusing. Change-Id: I6b872a7407141edeed33ac6157022743a2919f6d --- hacking/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacking/core.py b/hacking/core.py index 1db7f4b..84ff09c 100755 --- a/hacking/core.py +++ b/hacking/core.py @@ -824,7 +824,7 @@ class GitCheck(GlobalCheck): try: subp = subprocess.Popen( ['git', 'rev-parse', '--show-toplevel'], - stdout=subprocess.PIPE) + stdout=subprocess.PIPE, stderr=subprocess.PIPE) gitdir = subp.communicate()[0].rstrip() except OSError: # "git" was not found