Skip to content

Commit bef97fe

Browse files
author
Gauvain Pocentek
committed
fix pretty_print with managers
1 parent d0da618 commit bef97fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitlab/objects.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def pretty_print(self, depth=0):
294294
id = self.__dict__[self.idAttr]
295295
print("%s%s: %s" % (" " * depth * 2, self.idAttr, id))
296296
for k in sorted(self.__dict__.keys()):
297-
if k == self.idAttr or k == 'id':
297+
if k in (self.idAttr, 'id', 'gitlab'):
298298
continue
299299
if k[0] == '_':
300300
continue
@@ -309,6 +309,8 @@ def pretty_print(self, depth=0):
309309
v.pretty_print(1)
310310
else:
311311
print("%s: %s" % (pretty_k, v.id))
312+
elif isinstance(v, BaseManager):
313+
continue
312314
else:
313315
if hasattr(v, __name__) and v.__name__ == 'Gitlab':
314316
continue

0 commit comments

Comments
 (0)