summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2013-06-22 10:39:37 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2013-06-22 10:39:37 +0200
commit4c998eaa2a58efa25ae08bfe084c3ef76df98644 (patch)
tree94acb552f8281480ea4689d209f3b3dc6440f153 /gitlab.py
parenta7f206570b2a1a4104a9d6017c9b594fb3e93e13 (diff)
downloadgitlab-4c998eaa2a58efa25ae08bfe084c3ef76df98644.tar.gz
gitlab: make the current-user option work
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gitlab.py b/gitlab.py
index 515eb60..3888935 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -278,6 +278,9 @@ class Gitlab(object):
url = obj._url % obj.__dict__
url = '%s%s?private_token=%s' % (self._url, url, self.private_token)
+ print url
+ print obj.__dict__
+
try:
# TODO: avoid too much work on the server side by filtering the
# __dict__ keys
@@ -529,6 +532,8 @@ class User(GitlabObject):
class CurrentUserKey(GitlabObject):
_url = '/user/keys'
canUpdate = False
+ shortPrintAttr = 'title'
+ requiredCreateAttrs = ['title', 'key']
class CurrentUser(GitlabObject):
@@ -537,6 +542,7 @@ class CurrentUser(GitlabObject):
canCreate = False
canUpdate = False
canDelete = False
+ shortPrintAttr = 'username'
def Key(self, id=None, **kwargs):
if id is None: