mirror of
https://github.com/python/cpython.git
synced 2025-10-21 06:02:21 +00:00
Merged revisions 75662 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75662 | tarek.ziade | 2009-10-24 15:38:27 +0200 (Sat, 24 Oct 2009) | 9 lines Merged revisions 75659 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75659 | tarek.ziade | 2009-10-24 15:29:44 +0200 (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
f6779fb1a4
commit
53fdb18b82
3 changed files with 25 additions and 6 deletions
|
@ -171,10 +171,11 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
|
|||
func = format_info[0]
|
||||
for arg, val in format_info[1]:
|
||||
kwargs[arg] = val
|
||||
filename = 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