diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-06-03 15:40:27 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-06-03 16:16:06 +0000 |
commit | d87d73d2121638cb12f3a17ca01562f2d3e33e48 (patch) | |
tree | 615648d7a0dfec6577e6e410c41f8cfae53e48a7 /morphlib | |
parent | af8acd80ca4326d82266f5d8fa2eca0cca1e1fbc (diff) | |
download | morph-d87d73d2121638cb12f3a17ca01562f2d3e33e48.tar.gz |
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.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/remoteartifactcache.py | 5 |
1 files changed, 3 insertions, 2 deletions
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): |