[Piglit] [PATCH v2 2/3] piglit-summary.py: rewrite parse_listfile

Dylan Baker baker.dylan.c at gmail.com
Thu Aug 29 13:56:56 PDT 2013


This makes the parse_listfile in piglit-summary.py the same as the one
in piglit-summary-html.py.

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

diff --git a/piglit-summary.py b/piglit-summary.py
index 79d1554..24bb30d 100755
--- a/piglit-summary.py
+++ b/piglit-summary.py
@@ -41,8 +41,8 @@ def parse_listfile(filename):
     """
     Read a list of newline seperated file names and return them as a list
     """
-    return open(filename, "r").read().rstrip().split('\n')
-
+    with open(filename, 'r') as file:
+        return [path.expanduser(i.rstrip('\n')) for i in file.readlines()]
 
 def main():
     parser = argparse.ArgumentParser()
-- 
1.8.1.5



More information about the Piglit mailing list