mirror of
https://github.com/python/cpython
synced 2024-09-21 20:31:47 +00:00
Issue #21663: Fixed error caused by trying to create an existing directory.
This commit is contained in:
parent
7be121f2bc
commit
1a170a74f7
|
@ -238,7 +238,8 @@ def setup_python(self, context):
|
|||
if 'init.tcl' in files:
|
||||
tcldir = os.path.basename(root)
|
||||
tcldir = os.path.join(context.env_dir, 'Lib', tcldir)
|
||||
os.makedirs(tcldir)
|
||||
if not os.path.exists(tcldir):
|
||||
os.makedirs(tcldir)
|
||||
src = os.path.join(root, 'init.tcl')
|
||||
dst = os.path.join(tcldir, 'init.tcl')
|
||||
shutil.copyfile(src, dst)
|
||||
|
|
Loading…
Reference in a new issue