From f8fbffa2e04182e2f7bc0f64720f7ba925eab333 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 23 Jun 2015 15:50:50 +0100 Subject: distbuild: Add __str__() and __repr__() to ArtifactReference This is just to make the log files more readable, as what would previously have been logged as '' is now logged as the actual name of the artifact. Change-Id: I6189aa1390268cec379dd459fc3f4fecc71363b1 --- distbuild/artifact_reference.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'distbuild') diff --git a/distbuild/artifact_reference.py b/distbuild/artifact_reference.py index bdcfbf23..633ed749 100644 --- a/distbuild/artifact_reference.py +++ b/distbuild/artifact_reference.py @@ -30,6 +30,12 @@ class ArtifactReference(object): # pragma: no cover self._basename = basename self._dict = encoded + def __str__(self): + return self._basename + + def __repr__(self): + return '' % self._basename + def __getattr__(self, name): if not name.startswith('_'): return self._dict[name] -- cgit v1.2.1