add a string repr for FailEvent
This makes debugging code gone wrong a bit simpler. Also fix other __str__ function to use __repr__ as well, to make it consistent that objects which want representations implement __repr__ and not __str__. Change-Id: I6913da8f3ef6a4632d5f1c9d6ed26a38cdcd5e73
This commit is contained in:
parent
314d578653
commit
f9b2619fe4
@ -95,7 +95,7 @@ class FailJob(object):
|
|||||||
# of the build_uuid.
|
# of the build_uuid.
|
||||||
self.build_short_uuid = filter(None, url.split('/'))[-1]
|
self.build_short_uuid = filter(None, url.split('/'))[-1]
|
||||||
|
|
||||||
def __str__(self):
|
def __repr__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
@ -187,6 +187,11 @@ class FailEvent(object):
|
|||||||
return None
|
return None
|
||||||
return list(bugs)
|
return list(bugs)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return ("<FailEvent change:%s, rev:%s, project:%s,"
|
||||||
|
"url:%s, comment:%s>" %
|
||||||
|
(self.change, self.rev, self.project, self.url, self.comment))
|
||||||
|
|
||||||
|
|
||||||
class Stream(object):
|
class Stream(object):
|
||||||
"""Gerrit Stream.
|
"""Gerrit Stream.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user