summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/gitlab.py b/gitlab.py
index 50f429e..0214cfb 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -667,11 +667,7 @@ class CurrentUser(GitlabObject):
shortPrintAttr = 'username'
def Key(self, id=None, **kwargs):
- if id is None:
- return CurrentUserKey.list(self.gitlab, **kwargs)
- else:
- return CurrentUserKey(self.gitlab, id)
-
+ return self._getListOrObject(CurrentUserKey, id, **kwargs)
class GroupMember(GitlabObject):
_url = '/groups/%(group_id)s/members'