diff options
author | Daniel Firth <dan.firth@codethink.co.uk> | 2016-12-02 14:28:43 +0000 |
---|---|---|
committer | Daniel Firth <dan.firth@codethink.co.uk> | 2016-12-02 14:28:43 +0000 |
commit | e94b565240e0423a878d8457ecce3a47709dc2d9 (patch) | |
tree | 1c777e4e4bfb20276482757f86dd13f2bf8b299a | |
parent | de60729f09489a1144d17623295281d764b75c7e (diff) | |
download | ybd-e94b565240e0423a878d8457ecce3a47709dc2d9.tar.gz |
Stop returning string or False, None is fine
-rw-r--r-- | ybd/cache.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/ybd/cache.py b/ybd/cache.py index 345a8b2..81087df 100644 --- a/ybd/cache.py +++ b/ybd/cache.py @@ -250,10 +250,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]) @@ -264,7 +260,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: @@ -274,8 +270,6 @@ def get_cache(dn): pass return artifact - return False - def get_remote(dn): ''' If a remote cached artifact exists for d, retrieve it ''' |