# HG changeset patch # User Julien Cristau # Date 1445257746 -7200 # Node ID ee113e1e03deec8fa8ab86cf1171d54dd57079ed # Parent d261bd7c47cf4aa9205f027c9ee2f1b47844fd34 [devtools] pass a key to sort() method python3 dicts are not comparable diff -r d261bd7c47cf -r ee113e1e03de devtools/repotest.py --- a/devtools/repotest.py Wed Oct 21 17:21:18 2015 +0200 +++ b/devtools/repotest.py Mon Oct 19 14:29:06 2015 +0200 @@ -187,7 +187,7 @@ plan = self.qhelper.plan_factory(union, {}, FakeSession(self.repo)) plan.preprocess(union) for select in union.children: - select.solutions.sort() + select.solutions.sort(key=lambda x: list(x.items())) #print '********* ppsolutions', solutions return union @@ -238,7 +238,7 @@ if simplify: rqlhelper.simplify(rqlst) for select in rqlst.children: - select.solutions.sort() + select.solutions.sort(key=lambda x: list(x.items())) return self.o.plan_factory(rqlst, kwargs, cnx) def _prepare(self, cnx, rql, kwargs=None): @@ -286,9 +286,9 @@ if rqlst.TYPE == 'select': self.repo.vreg.rqlhelper.annotate(rqlst) for select in rqlst.children: - select.solutions.sort() + select.solutions.sort(key=lambda x: list(x.items())) else: - rqlst.solutions.sort() + rqlst.solutions.sort(key=lambda x: list(x.items())) return self.o.plan_factory(rqlst, kwargs, cnx)