Enable identifying variants in exception traces
When pungi crashes, the logs will often contain useless description of a variant. With this patch, the traceback will have details on the variant. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
5f0675dd66
commit
6e0f6ee73e
@ -185,6 +185,9 @@ class Variant(object):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.uid
|
return self.uid
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return 'Variant(id="{0.id}", name="{0.name}", type="{0.type}", parent={0.parent})'.format(self)
|
||||||
|
|
||||||
def __cmp__(self, other):
|
def __cmp__(self, other):
|
||||||
# variant < addon, layered-product < optional
|
# variant < addon, layered-product < optional
|
||||||
if self.type == other.type:
|
if self.type == other.type:
|
||||||
|
Loading…
Reference in New Issue
Block a user