summaryrefslogtreecommitdiff
path: root/lib/spack/llnl
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-05 19:55:07 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-05 20:00:30 -0800
commitad103dcafa652a839590f5fce28b2e2ce3b5a56d (patch)
treeffb815e80a12f258e0bd7f1e978c17b7cfa3968b /lib/spack/llnl
parent14d48eba461596b3c5b03cfe269318946406e02c (diff)
downloadspack-ad103dcafa652a839590f5fce28b2e2ce3b5a56d.tar.gz
spack-ad103dcafa652a839590f5fce28b2e2ce3b5a56d.tar.bz2
spack-ad103dcafa652a839590f5fce28b2e2ce3b5a56d.tar.xz
spack-ad103dcafa652a839590f5fce28b2e2ce3b5a56d.zip
Small refactor: add keep parameter to stage, get rid of stage.destroy call.
- package.py uses context manager more effectively. - Stage.__init__ has easier to understand method signature now. - keep can be used to override the default behavior either to keep the stage ALL the time or to delete the stage ALL the time.
Diffstat (limited to 'lib/spack/llnl')
-rw-r--r--lib/spack/llnl/util/filesystem.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 366237ef8f..a92cb0706d 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -362,8 +362,9 @@ def remove_dead_links(root):
def remove_linked_tree(path):
"""
- Removes a directory and its contents. If the directory is a symlink, follows the link and removes the real
- directory before removing the link.
+ Removes a directory and its contents. If the directory is a
+ symlink, follows the link and removes the real directory before
+ removing the link.
Args:
path: directory to be removed