aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Severinsson <jon@severinsson.net>2013-04-13 01:39:49 +0200
committerKenneth Graunke <kenneth@whitecape.org>2013-04-21 14:39:37 -0700
commit04c3348107fb494fd071a03f46baaf1c377c294d (patch)
tree3b475e5522195a5274a5b7b5dd63856a7d7fdb0e
parentcee97e7639d13cc8ebd427f65675874a1c76cde1 (diff)
downloadpiglit-04c3348107fb494fd071a03f46baaf1c377c294d.tar.gz
framework: Treat wglinfo, glxinfo and lspci output as text, not binary data.
On Python 3.x this has the side-effect of returning a str instead of a bytes. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--framework/core.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/core.py b/framework/core.py
index 3807cf96..6a3b97a3 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -395,7 +395,11 @@ class Environment:
def run(self, command):
try:
p = subprocess.Popen(
- command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ command,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ universal_newlines=True
+ )
(stdout, stderr) = p.communicate()
except:
return "Failed to run " + command