summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorAmar Sood (tekacs) <mail@tekacs.com>2014-10-05 11:29:21 +0100
committerAmar Sood (tekacs) <mail@tekacs.com>2014-10-05 11:29:21 +0100
commitb48331928225347aeee83af1bc3c1dee64205f9b (patch)
treeb2e3e290279c41c8f67c965e8a235a1817b63e22 /gitlab
parent6c4fc34438b49f856d388f32be445d380d72216a (diff)
downloadgitlab-b48331928225347aeee83af1bc3c1dee64205f9b.tar.gz
Update .sort to use key for Python 3.x.
Rather than really dubious cmp function.
Diffstat (limited to 'gitlab')
-rwxr-xr-xgitlab8
1 files changed, 1 insertions, 7 deletions
diff --git a/gitlab b/gitlab
index 1888500..7ddd48c 100755
--- a/gitlab
+++ b/gitlab
@@ -131,13 +131,7 @@ def usage():
if gitlab.GitlabObject in getmro(o) and o != gitlab.GitlabObject:
classes.append(o)
- def s(a, b):
- if a.__name__ < b.__name__:
- return -1
- elif a.__name__ > b.__name__:
- return 1
-
- classes.sort(cmp=s)
+ classes.sort(key=lambda x: x.__name__)
for cls in classes:
print(" %s" % clsToWhat(cls))