Prevent db-dump failure when sdk is not valid 21/17321/2
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Fri, 19 Oct 2018 20:17:04 +0000 (22:17 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Mon, 22 Oct 2018 12:16:57 +0000 (12:16 +0000)
Change-Id: I4cbc0b38333938836dac738f2240a05be1d6a09f
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
scripts/sdks/agl/db-dump

index e5ee8c8..d375177 100755 (executable)
@@ -26,6 +26,7 @@ import inspect
 import fnmatch
 import argparse
 import subprocess
+from subprocess import DEVNULL
 import re
 
 PARSER = argparse.ArgumentParser(
@@ -120,7 +121,8 @@ for one_sdk in INSTALLED_SDK:
     if ARCH == 'corei7-64':
         # Use /etc/rpm/platform to distinguish qemux86-64 from corei7-64 architecture
         grepQemu = subprocess.call(['grep', '-q', 'qemux86', os.path.join(
-            one_sdk['SYSROOTS'], 'corei7-64-agl-linux', 'etc', 'rpm', 'platform')])
+            one_sdk['SYSROOTS'], 'corei7-64-agl-linux', 'etc', 'rpm', 'platform')],
+            stdout=DEVNULL, stderr=subprocess.STDOUT)
         if grepQemu == 0:
             ARCH = 'qemux86-64'