summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 56201d3..93fcb49 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -424,6 +424,11 @@ class GitlabObject(object):
def __str__(self):
return '%s => %s' % (type(self), str(self.__dict__))
+ def __repr__(self):
+ return '<%s %s:%s>' % (self.__class__.__name__,
+ self.idAttr,
+ getattr(self, self.idAttr))
+
def display(self, pretty):
if pretty:
self.pretty_print()