Skip to content

Commit

Permalink
Exit if unpack fails - it's no good continuing
Browse files Browse the repository at this point in the history
  • Loading branch information
devcurmudgeon committed Jul 8, 2016
1 parent 3c82bc2 commit b6f6a55
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ybd/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ def unpack(dn, tmpfile):
unpackdir = tmpfile + '.unpacked'
os.makedirs(unpackdir)
if call(['tar', 'xf', tmpfile, '--directory', unpackdir]):
app.log(dn, 'Problem unpacking', tmpfile)
shutil.rmtree(os.path.dirname(tmpfile))
return False
app.log(dn, 'WARNING: Problem unpacking', tmpfile, exit=True)

try:
path = os.path.join(app.config['artifacts'], cache_key(dn))
Expand Down

0 comments on commit b6f6a55

Please sign in to comment.