summaryrefslogtreecommitdiff
path: root/morphlib/artifact.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-09-03 09:45:43 +0000
committerRichard Maw <richard.maw@gmail.com>2014-09-17 15:51:10 +0000
commit776961cdf1890aaed5a64cf5afb067ee86e88a80 (patch)
tree00029c74df587536c41e3a70326cdad2a10b49d0 /morphlib/artifact.py
parent4d38f6189114367014794619ef1fcb79e984c484 (diff)
downloadmorph-776961cdf1890aaed5a64cf5afb067ee86e88a80.tar.gz
Add __repr__ method to Source and SplitRules
This helps debugging issues with rule matching, since SplitRules can be print-statemented
Diffstat (limited to 'morphlib/artifact.py')
-rw-r--r--morphlib/artifact.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/artifact.py b/morphlib/artifact.py
index da6d3763..1e67643e 100644
--- a/morphlib/artifact.py
+++ b/morphlib/artifact.py
@@ -82,6 +82,9 @@ class Artifact(object):
def __str__(self): # pragma: no cover
return '%s|%s' % (self.source, self.name)
+ def __repr__(self): # pragma: no cover
+ return 'Artifact(%s)' % str(self)
+
def walk(self): # pragma: no cover
'''Return list of an artifact and its build dependencies.