minor updates
authorTony Mack <tmack@cs.princeton.edu>
Fri, 18 Apr 2008 00:38:08 +0000 (00:38 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Fri, 18 Apr 2008 00:38:08 +0000 (00:38 +0000)
qaapi/qa/utils.py

index 40eb086..00dbb7e 100644 (file)
@@ -17,11 +17,12 @@ def popen(command, fatal=True, verbose = False):
        header(command, False)  
     (stdin, stdout, stderr) = os.popen3(command)
     output = stdout.readlines()
+    errors = stderr.readlines()        
     print >> logfile, "+ "+command
     print >> logfile, "".join(output).strip() 
     # filter output generated by set x
     remove_set_x = lambda line: not line.startswith("+")        
-    errors = filter(remove_set_x, stderr.readlines())
+    errors = filter(remove_set_x, errors)
     
     if fatal and errors:
        raise Exception, "".join(errors)