mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-22 21:16:16 +01:00
- use Request's __cmd__ method for sorting
This commit is contained in:
parent
69458ca8c4
commit
7d5893992d
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user