fixed the move api in packaging.install, and closing the handle left by mkstemp() in its test module

This commit is contained in:
Tarek Ziade 2011-05-21 15:12:10 +02:00
parent 2db5674a95
commit 4bdd9f36a0
2 changed files with 12 additions and 10 deletions

View file

@ -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))