[Piglit] [PATCH 10/13] framework/core.py: fix parse_listfile

Dylan Baker baker.dylan.c at gmail.com
Thu Mar 6 14:47:20 PST 2014


This fixes the broken tests in the last patch. It's a trivial change,
instead of just stripping trailing newlines strip all leading and
trailing whitespace characters.

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 framework/core.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/core.py b/framework/core.py
index 2cb2216..96d51c6 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -695,4 +695,4 @@ def parse_listfile(filename):
         ['/home/user/tests1', '/home/users/tests2/main', '/tmp/test3']
     """
     with open(filename, 'r') as file:
-        return [os.path.expanduser(i.rstrip('\n')) for i in file.readlines()]
+        return [os.path.expanduser(i.strip()) for i in file.readlines()]
-- 
1.9.0



More information about the Piglit mailing list