From d87d73d2121638cb12f3a17ca01562f2d3e33e48 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 3 Jun 2014 15:40:27 +0000 Subject: Tweak exception message of remote artifact cache GetError Before: ERROR: Failed to get metadata meta for the artifact file:///src/ws-baserock-hawk/baserock/ps/build-system/baserock/baserock/definitions|refs/heads/baserock/builds/778b1a370a1f43c497c1354a2a949de1/56c9ec89d09240fd80faa7d2226b7eda|core|core-devel from the artifact cache http://git.baserock.org:8080/ After: ERROR: Failed to get metadata meta for the artifact f896a081beacd4a99ded38d28b44fbf02970038fb53349265f85f8f3298ead9d.stratum.core-devel from the artifact cache http://git.baserock.org:8080/ When debugging artifact cache issues, the information that's most useful is the filename of the artfact. --- morphlib/remoteartifactcache.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'morphlib') diff --git a/morphlib/remoteartifactcache.py b/morphlib/remoteartifactcache.py index 3fe0f444..0f8edce8 100644 --- a/morphlib/remoteartifactcache.py +++ b/morphlib/remoteartifactcache.py @@ -33,7 +33,7 @@ class GetError(cliapp.AppException): cliapp.AppException.__init__( self, 'Failed to get the artifact %s with cache key %s ' 'from the artifact cache %s' % - (artifact, artifact.cache_key, cache)) + (artifact.basename(), artifact.cache_key, cache)) class GetArtifactMetadataError(GetError): @@ -41,7 +41,8 @@ class GetArtifactMetadataError(GetError): def __init__(self, cache, artifact, name): cliapp.AppException.__init__( self, 'Failed to get metadata %s for the artifact %s ' - 'from the artifact cache %s' % (name, artifact, cache)) + 'from the artifact cache %s' % + (name, artifact.basename(), cache)) class GetSourceMetadataError(GetError): -- cgit v1.2.1