diff --git a/osc/commandline.py b/osc/commandline.py index 1e7ba524..3f76f4fc 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5044,7 +5044,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. what = {'project': ''} elif type in args_sr: requests = get_request_list(apiurl, req_who=user, exclude_target_projects=exclude_projects) - for r in requests_sort(requests): + for r in sorted(requests): print r.list_view(), '\n' return elif not type in args_pkg: diff --git a/osc/core.py b/osc/core.py index 988edcc3..32deb7cb 100644 --- a/osc/core.py +++ b/osc/core.py @@ -2568,7 +2568,7 @@ class Request: return '\n'.join(lines) def __cmp__(self, other): - return cmp(self.reqid, other.reqid) + return cmp(int(self.reqid), int(other.reqid)) def create(self, apiurl): """create a new request""" @@ -6122,7 +6122,4 @@ def filter_role(meta, user, role): for node in delete: root.remove(node) -def requests_sort(requests): - return sorted(requests, cmp=lambda a,b: cmp(int(a.reqid), int(b.reqid))) - # vim: sw=4 et