diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2013-06-29 16:16:05 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2013-06-29 16:16:05 +0200 |
commit | 33c771d5ecea84a38b59e75b6a2f6a099b2ba8b4 (patch) | |
tree | c8d7d1d70f12bbbf0acb848675eebb35bea91525 /gitlab.py | |
parent | 02bd7cd57d635bd30e105cda8b249ca5d656eb6c (diff) | |
download | gitlab-33c771d5ecea84a38b59e75b6a2f6a099b2ba8b4.tar.gz |
rework the script code organization
Diffstat (limited to 'gitlab.py')
-rw-r--r-- | gitlab.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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)) |