summaryrefslogtreecommitdiff
path: root/morphlib/ostreeartifactcache.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/ostreeartifactcache.py')
-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):