Browse Source

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

pull/224/head
Vinay Sajip 12 years ago
parent
commit
1a170a74f7
  1. 3
      Lib/venv/__init__.py

3
Lib/venv/__init__.py

@ -238,7 +238,8 @@ class EnvBuilder:
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…
Cancel
Save