diff options
author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-03 11:54:58 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-03 11:54:58 +0100 |
commit | bef97fe3a06802971d67fb70c5215f200cf31147 (patch) | |
tree | efa589d343e382f029d2e71f5a6e83dc3b7f7a70 /gitlab/objects.py | |
parent | d0da618a793ef974e1f547c2ac28481f3719c152 (diff) | |
download | gitlab-bef97fe3a06802971d67fb70c5215f200cf31147.tar.gz |
fix pretty_print with managers
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r-- | gitlab/objects.py | 4 |
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 |