summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2014-06-05 08:32:24 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2014-06-05 08:32:24 (GMT)
commitae0767bb5be2f6c4288f313eea7bcb529c9c0923 (patch)
tree83de2225bd061377f1e22e0fca0e8a054142e23f
parentcbd619bd6afa77210076c4a6d9c04e1308dd676e (diff)
parent1a170a74f7c2fc57e9df7bce139a604ddface1fc (diff)
downloadcpython-ae0767bb5be2f6c4288f313eea7bcb529c9c0923.zip
cpython-ae0767bb5be2f6c4288f313eea7bcb529c9c0923.tar.gz
cpython-ae0767bb5be2f6c4288f313eea7bcb529c9c0923.tar.bz2
Closes #21663: Merged fix from 3.4.
-rw-r--r--Lib/venv/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index b5ef2d8..3a7e8e2 100644
--- a/Lib/venv/__init__.py
+++ b/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)