diff options
| author | Yannick Gingras <ygingras@ygingras.net> | 2011-01-29 18:10:22 -0500 |
|---|---|---|
| committer | Yannick Gingras <ygingras@ygingras.net> | 2011-01-29 18:10:22 -0500 |
| commit | a8cd5ae197a8967ca327016924c115ec1ffef64c (patch) | |
| tree | 9b1a015170fa8de35eb3aaa08c8c72a3a65df4d4 /distutils2 | |
| parent | c6d607199000a35ea007e7d41cdb765d57c357cb (diff) | |
| download | disutils2-a8cd5ae197a8967ca327016924c115ec1ffef64c.tar.gz | |
fixed another leaking tempdir
Diffstat (limited to 'distutils2')
| -rw-r--r-- | distutils2/install.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/distutils2/install.py b/distutils2/install.py index 09f83cf..18732d9 100644 --- a/distutils2/install.py +++ b/distutils2/install.py @@ -130,8 +130,10 @@ def install_dists(dists, path=None): :param dists: distributions to install :param path: base path to install distribution in """ + path_is_tmp = False if not path: path = mkdtemp() + path_is_tmp = True installed_dists, installed_files = [], [] for d in dists: @@ -146,6 +148,10 @@ def install_dists(dists, path=None): for d in installed_dists: uninstall(d) raise e + finally: + if path_is_tmp: + shutil.rmtree(path) + return installed_files |
