Skip to content

Commit

Permalink
skip if temporary directory could not be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelduranfrigola committed Jun 14, 2023
1 parent 89d9f1a commit 65068d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ersilia/serve/autoservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ def clean_temp_dir(self):
if "ersilia-" in d:
d = os.path.join(tmp_folder, d)
self.logger.debug("Flushing temporary directory {0}".format(d))
shutil.rmtree(d)
try:
shutil.rmtree(d)
except:
self.logger.warning("Could not remove temporary directory {0}".format(d))

def clean_docker_containers(self):
self.logger.debug("Silencing docker containers if necessary")
Expand Down

0 comments on commit 65068d4

Please sign in to comment.