summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-03 11:54:58 +0100
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-03 11:54:58 +0100
commitbef97fe3a06802971d67fb70c5215f200cf31147 (patch)
treeefa589d343e382f029d2e71f5a6e83dc3b7f7a70 /gitlab/objects.py
parentd0da618a793ef974e1f547c2ac28481f3719c152 (diff)
downloadgitlab-bef97fe3a06802971d67fb70c5215f200cf31147.tar.gz
fix pretty_print with managers
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index e6f5467..b0ba782 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -294,7 +294,7 @@ class GitlabObject(object):
id = self.__dict__[self.idAttr]
print("%s%s: %s" % (" " * depth * 2, self.idAttr, id))
for k in sorted(self.__dict__.keys()):
- if k == self.idAttr or k == 'id':
+ if k in (self.idAttr, 'id', 'gitlab'):
continue
if k[0] == '_':
continue
@@ -309,6 +309,8 @@ class GitlabObject(object):
v.pretty_print(1)
else:
print("%s: %s" % (pretty_k, v.id))
+ elif isinstance(v, BaseManager):
+ continue
else:
if hasattr(v, __name__) and v.__name__ == 'Gitlab':
continue