]> code.ossystems Code Review - openembedded-core.git/commitdiff
externalsrc.bbclass: Suppress git errors
authorJoshua Watt <jpewhacker@gmail.com>
Wed, 14 Feb 2018 17:09:38 +0000 (11:09 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Feb 2018 18:05:26 +0000 (18:05 +0000)
Suppress any warnings git might generate when searching for a valid git
directory, as there are use cases where the directory is expected to not
exist and the warning is superfluous

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/externalsrc.bbclass

index 65dd13ddc1f7fc4d6b62ff61d87caa0c589cf8ca..ac1b904e72ce75ef04edbe08fe8f07619e469fc2 100644 (file)
@@ -189,7 +189,7 @@ def srctree_hash_files(d, srcdir=None):
 
     try:
         git_dir = os.path.join(s_dir,
-            subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir']).decode("utf-8").rstrip())
+            subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip())
     except subprocess.CalledProcessError:
         pass