Bug 1243512 - Also sort finished experiments. rs=me
authorFelipe Gomes <felipc@gmail.com>
Thu, 11 Feb 2016 19:55:54 -0200
changeset 75 455cd6114b968cfbcfc1b15fa79a86097c602168
parent 74 cefdc8498df33807be44e22aa0d45379e994bf7c
child 76 3ac53e8441223f530fd05b002bf393c43561e3af
push id57
push userfelipc@gmail.com
push dateThu, 11 Feb 2016 23:14:52 +0000
reviewersme
bugs1243512
Bug 1243512 - Also sort finished experiments. rs=me
build.py
--- a/build.py
+++ b/build.py
@@ -99,17 +99,17 @@ def build(dest_path, baseurl):
                 raise Exception('Build script did not produce an .xpi: %s' %
                     build_path)
 
         d = e.manifest.copy()
         d["xpiURL"] = "%s%s/experiment.xpi" % (baseurl, quote(e.manifest["id"]))
         d["xpiHash"] = "sha256:%s" % (sha256(output_xpi),)
         jdata['experiments'].append(d)
 
-    experiments.sort(key=lambda e: (e.finished or e.disabled, -e.manifest["startTime"]))
+    experiments.sort(key=lambda e: (e.finished or e.disabled or -e.manifest["startTime"], -e.manifest["startTime"]))
 
     write_template('index.xhtml', 'index.html', experiments=experiments)
     copy_template('htaccess', '.htaccess')
 
     with open(os.path.join(dest_path, 'firefox-manifest.json'), 'wb') as fh:
         json.dump(jdata, fh)
 
 if __name__ == "__main__":