mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
fixed the move api in packaging.install, and closing the handle left by mkstemp() in its test module
This commit is contained in:
parent
2db5674a95
commit
4bdd9f36a0
2 changed files with 12 additions and 10 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue