Issue #21663: Fixed error caused by trying to create an existing directory.

This commit is contained in:
Vinay Sajip 2014-06-05 09:31:20 +01:00
parent 7be121f2bc
commit 1a170a74f7

View file

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