diff options
author | Robert Loehning <robert.loehning@qt.io> | 2016-05-30 11:52:37 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2016-05-30 10:40:12 +0000 |
commit | 7e9aa9c9081f4da36344933101ded8328fa87200 (patch) | |
tree | 3db84ae1a8b47830516384b932480e1390fc99c9 | |
parent | c1e7cf84e40a9c54577e614d626a4f5774708fec (diff) |
Squish: Silence warnings in tst_default_settings
Change-Id: I668cc7b1fcb569b50d2178fe792f566721c9d4d4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | tests/system/shared/utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 1429cb6c0f..bdd64fcdcd 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -139,7 +139,7 @@ def which(program): command = "where" else: command = "which" - foundPath = getOutputFromCmdline([command, program]) + foundPath = getOutputFromCmdline([command, program], acceptedError=1) if foundPath: return foundPath.splitlines()[0] else: @@ -216,11 +216,12 @@ def logApplicationOutput(): return None # get the output from a given cmdline call -def getOutputFromCmdline(cmdline, environment=None): +def getOutputFromCmdline(cmdline, environment=None, acceptedError=0): try: return subprocess.check_output(cmdline, env=environment) except subprocess.CalledProcessError as e: - test.warning("Command '%s' returned %d" % (e.cmd, e.returncode)) + if e.returncode != acceptedError: + test.warning("Command '%s' returned %d" % (e.cmd, e.returncode)) return e.output def selectFromFileDialog(fileName, waitForFile=False): |