[Piglit] [PATCH 1/3] piglit-summary-html.py: Replace .read().split('\n') with .readlines()

Dylan Baker baker.dylan.c at gmail.com
Tue Jul 30 07:41:54 PDT 2013


This is equivalent but simpler.

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

diff --git a/piglit-summary-html.py b/piglit-summary-html.py
index 39ae474..6fed689 100755
--- a/piglit-summary-html.py
+++ b/piglit-summary-html.py
@@ -39,7 +39,7 @@ def parse_listfile(filename):
     element at the end.
     """
     with open(filename, 'r') as file:
-        return [path.expanduser(i) for i in file.read().rstrip().split('\n')]
+        return [path.expanduser(i.rstrip('\n')) for i in file.readlines()]
 
 
 def main():
-- 
1.8.3.1



More information about the Piglit mailing list