Skip to content

Commit 4664ebd

Browse files
author
Gauvain Pocentek
committed
Merge pull request #38 from mjmaenpaa/currentuser_key
Changed CurrentUser.Key to use _getListOrObject-method like all other functions
2 parents 2c86085 + afcf1c2 commit 4664ebd

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

gitlab.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,7 @@ class CurrentUser(GitlabObject):
667667
shortPrintAttr = 'username'
668668

669669
def Key(self, id=None, **kwargs):
670-
if id is None:
671-
return CurrentUserKey.list(self.gitlab, **kwargs)
672-
else:
673-
return CurrentUserKey(self.gitlab, id)
674-
670+
return self._getListOrObject(CurrentUserKey, id, **kwargs)
675671

676672
class GroupMember(GitlabObject):
677673
_url = '/groups/%(group_id)s/members'

0 commit comments

Comments
 (0)