[gvfs] tests: Suppress unnecessary output from find_alternative



commit bab2941f14288285e3556bcc9406dffb2340eea1
Author: Ondrej Holy <oholy redhat com>
Date:   Tue May 24 12:19:11 2016 +0200

    tests: Suppress unnecessary output from find_alternative
    
    This suppress the following output from find_alternative:
    which: no apache2 in ($PATH)

 test/gvfs-test |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 8a4ada1..86ed611 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -55,7 +55,7 @@ def find_alternative(cmds):
     '''Find command in cmds array and return the found alternative'''
 
     for cmd in cmds:
-        if subprocess.call(['which', cmd], stdout=subprocess.PIPE) == 0:
+        if subprocess.call(['which', cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0:
             return cmd
 
 in_testbed = os.path.exists('/home/gvfs_sandbox_marker')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]