Skip to content

Commit

Permalink
Merge pull request #34 from tekacs/master
Browse files Browse the repository at this point in the history
Update .sort to use key for Python 3.x.
  • Loading branch information
Gauvain Pocentek committed Oct 5, 2014
2 parents 6c4fc34 + b483319 commit ff2d84c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions gitlab
Expand Up @@ -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))

Expand Down

0 comments on commit ff2d84c

Please sign in to comment.