summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-02 10:07:57 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-10 13:52:27 +0000
commit2cfee93ef782ad9891deabb1ede524e84442bcba (patch)
tree93fcf955baffdd7fb034c527460cc7b9f0813052
parentee387ef30827fc769b3bab0fed1638d02af322fe (diff)
downloadmorph-2cfee93ef782ad9891deabb1ede524e84442bcba.tar.gz
fixup: artifact.name does not work
-rw-r--r--morphlib/ostreeartifactcache.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/morphlib/ostreeartifactcache.py b/morphlib/ostreeartifactcache.py
index 0c00c659..3a988ca6 100644
--- a/morphlib/ostreeartifactcache.py
+++ b/morphlib/ostreeartifactcache.py
@@ -47,12 +47,13 @@ class OSTreeArtifactCache(object):
handle = remote.get_artifact_metadata(artifact, metadata_name)
self.status(
msg='Downloading %(name)s %(metadata_name)s as a file.',
- chatty=True, name=artifact.name, metadata_name=metadata_name)
+ chatty=True, name=artifact.basename(),
+ metadata_name=metadata_name)
else:
handle = remote.get(artifact)
self.status(
msg='Downloading %(name)s as a tarball.', chatty=True,
- name=artifact.name)
+ name=artifact.basename())
try:
temporary_download = tempfile.NamedTemporaryFile(dir=self.cachedir)
@@ -74,8 +75,9 @@ class OSTreeArtifactCache(object):
contents of directory should be the contents of the artifact.
"""
+ cache_key, kind, name = artifact.basename().split('.', 2)
ref = self._get_artifact_cache_name(artifact)
- subject = artifact.name
+ subject = name
try:
self.status(
msg='Committing %(subject)s to artifact cache at %(ref)s.',