From afcf1c23c36a7aa0f65392892ca4abb973e35b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20M=C3=A4enp=C3=A4=C3=A4?= Date: Thu, 9 Oct 2014 10:30:41 +0300 Subject: [PATCH] CurrentUser.Key uses _getListOrObject-method --- gitlab.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gitlab.py b/gitlab.py index 50f429e8e..0214cfb61 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'