summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Firth <dan.firth@codethink.co.uk>2016-12-02 14:28:43 +0000
committerlocallycompact <locallycompact@gmail.com>2017-07-14 13:41:23 +0000
commita15323e92eae2b728a11fdc1615518dae2d11865 (patch)
tree3200fce0d722d55e45f3fb6ddf3f6430c2ff5b09
parent60be861feb8805f32484ad05109b86a9414eec20 (diff)
downloadybd-lc/stringorfalse.tar.gz
Stop returning string or False, None is finelc/stringorfalse
-rw-r--r--ybd/cache.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/ybd/cache.py b/ybd/cache.py
index 17d5517..ac51ae0 100644
--- a/ybd/cache.py
+++ b/ybd/cache.py
@@ -258,10 +258,6 @@ def upload(dn):
def get_cache(dn):
''' Check if a cached artifact exists for the hashed version of d. '''
-
- if cache_key(dn) is False:
- return False
-
cachedir = os.path.join(app.config['artifacts'], cache_key(dn))
if os.path.isdir(cachedir):
call(['touch', cachedir])
@@ -272,7 +268,7 @@ def get_cache(dn):
tmpdir = tempfile.mkdtemp()
if call(['tar', 'xf', artifact, '--directory', tmpdir]):
app.log(dn, 'Problem unpacking', artifact)
- return False
+ return
try:
shutil.move(tmpdir, unpackdir)
except:
@@ -282,8 +278,6 @@ def get_cache(dn):
pass
return artifact
- return False
-
def get_remote(dn):
''' If a remote cached artifact exists for d, retrieve it '''