diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-06-16 12:24:51 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-06-16 12:24:51 +0100 |
commit | 22abdfef781b98f3638c263a590931fa57825c1d (patch) | |
tree | 3916c1deece33d50f00745495ec6bc72ce3f05b1 /morphlib/plugins | |
parent | d9be3c69242ff44fd8af05cf4b0bc7f8fe41d691 (diff) | |
parent | c1164a88d9b07d165ff5eed6c8026be8241beb64 (diff) | |
download | morph-22abdfef781b98f3638c263a590931fa57825c1d.tar.gz |
Merge remote-tracking branch 'origin/sam/distbuild-gc-fix'
Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
Diffstat (limited to 'morphlib/plugins')
-rw-r--r-- | morphlib/plugins/gc_plugin.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/plugins/gc_plugin.py b/morphlib/plugins/gc_plugin.py index 43de173e..68f386eb 100644 --- a/morphlib/plugins/gc_plugin.py +++ b/morphlib/plugins/gc_plugin.py @@ -79,6 +79,8 @@ class GCPlugin(cliapp.Plugin): self.cleanup_cachedir(cachedir, cachedir_min_space) def cleanup_tempdir(self, temp_path, min_space): + # The subdirectories in tempdir are created at Morph startup time. Code + # assumes that they exist in various places. self.app.status(msg='Cleaning up temp dir %(temp_path)s', temp_path=temp_path, chatty=True) for subdir in ('deployments', 'failed', 'chunks'): @@ -93,6 +95,7 @@ class GCPlugin(cliapp.Plugin): path = os.path.join(temp_path, subdir) if os.path.exists(path): shutil.rmtree(path) + os.mkdir(path) def calculate_delete_range(self): now = time.time() |