Skip to content

Commit

Permalink
Try to cleanup temp directory after locator is GC
Browse files Browse the repository at this point in the history
  • Loading branch information
reyery committed Sep 28, 2023
1 parent 97bc1ce commit c9a73b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cea/inputlocator.py
Expand Up @@ -36,6 +36,10 @@ def __init__(self, scenario, plugins=None):

self._temp_directory = None

def __del__(self):
if self._temp_directory is not None:
self._temp_directory.cleanup()

def __getstate__(self):
"""Make sure we can pickle an InputLocator..."""
return {
Expand Down

0 comments on commit c9a73b4

Please sign in to comment.