Stop the /dev/null redirection abuse
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 10 Sep 2008 11:33:30 +0100
changeset 3670 81b9840155de
parent 3668 5e2260309dca
child 3671 eacfb4274caa
Stop the /dev/null redirection abuse
wscript
--- a/wscript	Tue Sep 09 12:35:11 2008 -0700
+++ b/wscript	Wed Sep 10 11:33:30 2008 +0100
@@ -854,7 +854,7 @@
             if verbose:
                 #diffCmd = "diff traces " + refTestDirName + " | head"
                 diffCmd = subprocess.Popen([self.diff, "traces", refTestDirName],
-                                           stderr=dev_null(), stdout=dev_null())
+                                           stdout=dev_null())
                 headCmd = subprocess.Popen("head", stdin=diffCmd.stdout)
                 rc2 = headCmd.wait()
                 diffCmd.stdout.close()
@@ -912,18 +912,16 @@
         print "Synchronizing reference traces using Mercurial."
         if not os.path.exists(dir_name):
             print "Cloning " + REGRESSION_TRACES_REPO + dir_name + " from repo."
-            subprocess.Popen(["hg", "clone", REGRESSION_TRACES_REPO + dir_name, dir_name],
-                             stdout=dev_null(), stderr=dev_null()).wait()
+            argv = ["hg", "clone", REGRESSION_TRACES_REPO + dir_name, dir_name]
+            rv = subprocess.Popen(argv).wait()
         else:
             _dir = os.getcwd()
             os.chdir(dir_name)
             try:
                 print "Pulling " + REGRESSION_TRACES_REPO + dir_name + " from repo."
-                result = subprocess.Popen(["hg", "-q", "pull", REGRESSION_TRACES_REPO + dir_name],
-                                          stdout=dev_null(), stderr=dev_null()).wait()
+                result = subprocess.Popen(["hg", "-q", "pull", REGRESSION_TRACES_REPO + dir_name]).wait()
                 if not result:
-                    result = subprocess.Popen(["hg", "-q", "update"],
-                                              stdout=dev_null(), stderr=dev_null()).wait()
+                    result = subprocess.Popen(["hg", "-q", "update"]).wait()
             finally:
                 os.chdir("..")
             if result: