diff options
| author | Amar Sood (tekacs) <mail@tekacs.com> | 2014-10-05 11:29:21 +0100 |
|---|---|---|
| committer | Amar Sood (tekacs) <mail@tekacs.com> | 2014-10-05 11:29:21 +0100 |
| commit | b48331928225347aeee83af1bc3c1dee64205f9b (patch) | |
| tree | b2e3e290279c41c8f67c965e8a235a1817b63e22 /gitlab | |
| parent | 6c4fc34438b49f856d388f32be445d380d72216a (diff) | |
| download | gitlab-b48331928225347aeee83af1bc3c1dee64205f9b.tar.gz | |
Update .sort to use key for Python 3.x.
Rather than really dubious cmp function.
Diffstat (limited to 'gitlab')
| -rwxr-xr-x | gitlab | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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)) |
