summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-14 14:08:09 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-14 14:08:37 +0000
commitcb7184549d43d7a1cb80df4641760cb92505672b (patch)
tree9937847118e469028c2e588212459ad7e5754747
parentdf621335702009867ed0310d080cad60948dd3a0 (diff)
downloadmorph-cb7184549d43d7a1cb80df4641760cb92505672b.tar.gz
fixup: Fix local-artifact-cache list-all
-rw-r--r--morphlib/localartifactcache.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/morphlib/localartifactcache.py b/morphlib/localartifactcache.py
index e6695c4e..9e3c9e70 100644
--- a/morphlib/localartifactcache.py
+++ b/morphlib/localartifactcache.py
@@ -132,8 +132,9 @@ class LocalArtifactCache(object):
CacheInfo = collections.namedtuple('CacheInfo', ('artifacts', 'mtime'))
contents = collections.defaultdict(lambda: CacheInfo(set(), 0))
for filename in self.cachefs.walkfiles():
- cachekey = filename[:63]
- artifact = filename[65:]
+ if filename.startswith('/repo'): # pragma: no cover
+ continue
+ cachekey, artifact = filename.split('.', 1)
artifacts, max_mtime = contents[cachekey]
artifacts.add(artifact)
art_info = self.cachefs.getinfo(filename)