summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2013-06-29 16:16:05 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2013-06-29 16:16:05 +0200
commit33c771d5ecea84a38b59e75b6a2f6a099b2ba8b4 (patch)
treec8d7d1d70f12bbbf0acb848675eebb35bea91525 /gitlab.py
parent02bd7cd57d635bd30e105cda8b249ca5d656eb6c (diff)
downloadgitlab-33c771d5ecea84a38b59e75b6a2f6a099b2ba8b4.tar.gz
rework the script code organization
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 3888935..9419627 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -490,6 +490,12 @@ class GitlabObject(object):
def __str__(self):
return '%s => %s' % (type(self), str(self.__dict__))
+ def display(self, pretty):
+ if pretty:
+ self.pretty_print()
+ else:
+ self.short_print()
+
def short_print(self, depth=0):
id = self.__dict__[self.idAttr]
print("%s%s: %s" % (" " * depth * 2, self.idAttr, id))