diff options
author | Tarek Ziade <tarek@ziade.org> | 2011-05-21 13:12:10 (GMT) |
---|---|---|
committer | Tarek Ziade <tarek@ziade.org> | 2011-05-21 13:12:10 (GMT) |
commit | 4bdd9f36a0c1ad8ec0cb95f3a4e014df1e6046a4 (patch) | |
tree | f3aefa411c7813ee4c901f5ba77a980eb704ff33 /Lib/packaging/install.py | |
parent | 2db5674a95fe1a65a3594c3bb5431beced22e240 (diff) | |
download | cpython-4bdd9f36a0c1ad8ec0cb95f3a4e014df1e6046a4.zip cpython-4bdd9f36a0c1ad8ec0cb95f3a4e014df1e6046a4.tar.gz cpython-4bdd9f36a0c1ad8ec0cb95f3a4e014df1e6046a4.tar.bz2 |
fixed the move api in packaging.install, and closing the handle left by mkstemp() in its test module
Diffstat (limited to 'Lib/packaging/install.py')
-rw-r--r-- | Lib/packaging/install.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/packaging/install.py b/Lib/packaging/install.py index 3904727..92657ea 100644 --- a/Lib/packaging/install.py +++ b/Lib/packaging/install.py @@ -47,10 +47,8 @@ def _move_files(files, destination): destination = tempfile.mkdtemp() for old in files: - # not using os.path.join() because basename() might not be - # unique in destination - new = "%s%s" % (destination, old) - + filename = os.path.split(old)[-1] + new = os.path.join(destination, filename) # try to make the paths. try: os.makedirs(os.path.dirname(new)) |