# HG changeset patch # User RĂ©mi Cardona # Date 1442592091 -7200 # Node ID edd1ba9bb030472bb1aa1fc0bf0bd8f60ee57cb5 # Parent 8a2ec43fcf44862e86db4aed40d2ea3433ce7131 [py3k] Don't sort Action objects In python 3, arbitrary objects are no longer sortable. diff -r 8a2ec43fcf44 -r edd1ba9bb030 web/box.py --- a/web/box.py Tue Sep 22 15:25:25 2015 +0200 +++ b/web/box.py Fri Sep 18 18:01:31 2015 +0200 @@ -43,7 +43,7 @@ actions_by_cat.setdefault(action.category, []).append( (action.title, action) ) for key, values in actions_by_cat.items(): - actions_by_cat[key] = [act for title, act in sorted(values)] + actions_by_cat[key] = [act for title, act in sorted(values, key=lambda x: x[0])] if categories_in_order: for cat in categories_in_order: if cat in actions_by_cat: