[Piglit] [PATCH] results: assume version is 0 when loading from file

Ilia Mirkin imirkin at alum.mit.edu
Wed Dec 31 10:03:20 PST 2014


Original files didn't have a version baked into them. Assume version 0
for those. Newer files will overwrite the version with whatever is
stored.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 framework/results.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/framework/results.py b/framework/results.py
index cfc2ec4..5819af5 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -126,6 +126,7 @@ class TestrunResult(object):
     def load(cls, results_file):
         """Create a TestrunResult from a completed file."""
         result = cls()
+        result.results_version = 0
         result.__dict__.update(json.load(results_file))
 
         for key, value in result.tests.iteritems():
-- 
2.0.5



More information about the Piglit mailing list