summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-02 15:19:54 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-10 13:52:27 +0000
commitc8d3522f7dcc9785b331cb0ef2bf4ce7f5bff788 (patch)
tree73ce4df39642c001b4dea4ae7457188989ab97e1
parentbb782e4604f66a781f5f1392ccbb9df08f4ddf82 (diff)
downloadmorph-c8d3522f7dcc9785b331cb0ef2bf4ce7f5bff788.tar.gz
fixup: ostreeartifactcache fixes
-rw-r--r--morphlib/ostreeartifactcache.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/morphlib/ostreeartifactcache.py b/morphlib/ostreeartifactcache.py
index 3a988ca6..a7602144 100644
--- a/morphlib/ostreeartifactcache.py
+++ b/morphlib/ostreeartifactcache.py
@@ -63,7 +63,6 @@ class OSTreeArtifactCache(object):
temporary_download.close()
def _get_artifact_cache_name(self, artifact):
- logging.debug('LAC: %s' % artifact.basename())
cache_key, kind, name = artifact.basename().split('.', 2)
suffix = name.split('-')[-1]
return '%s-%s' % (cache_key, suffix)
@@ -191,13 +190,15 @@ class OSTreeArtifactCache(object):
cachekey, kind, name = artifact.basename().split('.', 2)
logging.debug('OSTreeArtifactCache: checking for %s, %s, %s' %
(cachekey, kind, name))
+ if kind == 'stratum':
+ if self._has_file(self.artifact_filename(artifact)):
+ return True
+ else:
+ return False
sha = self.repo.resolve_rev(self._get_artifact_cache_name(artifact))
if sha:
self.repo.touch_ref(self._get_artifact_cache_name(artifact))
return True
- if kind == 'stratum' and \
- self._has_file(self.artifact_filename(artifact)):
- return True
return False
def get_artifact_metadata(self, artifact, name):