[Piglit] [PATCH v2 7/9] tests/oglconform.py: simplify writing to /dev/null

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Mon Oct 26 11:58:59 PDT 2015


From: Dylan Baker <baker.dylan.c at gmail.com>

I'm a little surprised this actually works in current form, since it's
currently pointing to an int, rather than a file-like object.

This patch simplifies the code by pointing at the open file-like object.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/oglconform.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/oglconform.py b/tests/oglconform.py
index 710c406..8d29af2 100644
--- a/tests/oglconform.py
+++ b/tests/oglconform.py
@@ -71,9 +71,9 @@ def _make_profile():
     profile_ = TestProfile()
 
     with tempfile.NamedTemporaryFile() as f:
-        with open(os.devnull, "w") as devnull:
+        with open(os.devnull, "w") as d:
             subprocess.call([BIN, '-generateTestList', f.name],
-                            stdout=devnull.fileno(), stderr=devnull.fileno())
+                            stdout=d, stderr=d)
 
         f.seek(0)
 
-- 
2.6.2



More information about the Piglit mailing list