From f72b4dc8ad951244b4470f5dba7efd4bbd0f63f0 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 13 May 2015 16:14:54 +0000 Subject: Give exact filename when an artifact is not found in the cache. Old message: ERROR: Deployment failed as mason-system-x86_64-generic-rootfs is not present in the artifact cache. Please ensure that mason-system-x86_64-generic-rootfs is built before deployment, and the artifact-cache-server (http://cache.baserock.org:8080/) is the correct one. New message: ERROR: Deployment failed as 45b8053511473de1220e894f589428c94c7d1240d11c0154a5c368bb7b7dedc2.system.mason-system-x86_64-generic-rootfs is not present in the artifact cache. Please ensure that mason-system-x86_64-generic-rootfs is built before deployment, and the artifact-cache-server (http://cache.baserock.org:8080/) is the correct one. Change-Id: Idd9e92f1c842d428795886a3a7c0026cc42f54b1 --- morphlib/plugins/deploy_plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index b98f3b3c..c1ec12a8 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -118,7 +118,8 @@ class NotYetBuiltError(morphlib.Error): self.msg = ('Deployment failed as %s is not present in the ' 'artifact cache.\nPlease ensure that %s is built ' 'before deployment, and the artifact-cache-server (%s) is ' - 'the correct one.' % (artifact, artifact, rac)) + 'the correct one.' % (artifact.basename(), artifact.name, + rac)) class DeployPlugin(cliapp.Plugin): @@ -640,7 +641,7 @@ class DeployPlugin(cliapp.Plugin): build_command.cache_artifacts_locally([artifact]) f = build_command.lac.get(artifact) else: - raise NotYetBuiltError(artifact.name, build_command.rac) + raise NotYetBuiltError(artifact, build_command.rac) tf = tarfile.open(fileobj=f) tf.extractall(path=path) -- cgit v1.2.1