Make the cleanup() function just remove the tmpdir location.
This commit is contained in:
parent
fe8b541620
commit
3ec372e546
@ -130,5 +130,4 @@ if __name__ == "__main__":
|
||||
sys.stderr.write("Error writing %s/.discinfo file.\n" % (output,))
|
||||
|
||||
# clean up
|
||||
trash = [yumconf, treedir, buildinstdir]
|
||||
pylorax.cleanup(trash)
|
||||
pylorax.cleanup()
|
||||
|
@ -201,13 +201,14 @@ def cleanup(trash=[]):
|
||||
|
||||
"""
|
||||
|
||||
if trash is []:
|
||||
return
|
||||
|
||||
if trash != []:
|
||||
for item in trash:
|
||||
if os.path.isdir(item):
|
||||
shutil.rmtree(item, ignore_errors=True)
|
||||
else:
|
||||
os.unlink(item)
|
||||
|
||||
if os.path.isdir(conf['tmpdir']):
|
||||
shutil.rmtree(conf['tmpdir'], ignore_errors=True)
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user