mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Merged revisions 75659 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk Only the try/except was backported; owner and group were added in 2.7, as was the test file. ........ r75659 | tarek.ziade | 2009-10-24 09:29:44 -0400 (Sat, 24 Oct 2009) | 1 line #7066 - Fixed distutils.archive_util.make_archive behavior so it restores the cwd ........
This commit is contained in:
parent
1d978df33f
commit
2b112a6bb3
2 changed files with 9 additions and 3 deletions
|
@ -162,9 +162,12 @@ def make_archive (base_name, format,
|
|||
kwargs[arg] = val
|
||||
filename = apply(func, (base_name, base_dir), kwargs)
|
||||
|
||||
if root_dir is not None:
|
||||
log.debug("changing back to '%s'", save_cwd)
|
||||
os.chdir(save_cwd)
|
||||
try:
|
||||
filename = func(base_name, base_dir, **kwargs)
|
||||
finally:
|
||||
if root_dir is not None:
|
||||
log.debug("changing back to '%s'", save_cwd)
|
||||
os.chdir(save_cwd)
|
||||
|
||||
return filename
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue