Skip to content

Commit b6f6a55

Browse files
committed
Exit if unpack fails - it's no good continuing
1 parent 3c82bc2 commit b6f6a55

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ybd/cache.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ def unpack(dn, tmpfile):
182182
unpackdir = tmpfile + '.unpacked'
183183
os.makedirs(unpackdir)
184184
if call(['tar', 'xf', tmpfile, '--directory', unpackdir]):
185-
app.log(dn, 'Problem unpacking', tmpfile)
186-
shutil.rmtree(os.path.dirname(tmpfile))
187-
return False
185+
app.log(dn, 'WARNING: Problem unpacking', tmpfile, exit=True)
188186

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

0 commit comments

Comments
 (0)