summaryrefslogtreecommitdiffstats
path: root/Lib/venv/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/venv/__init__.py')
-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)