From 1a170a74f7c2fc57e9df7bce139a604ddface1fc Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Thu, 5 Jun 2014 09:31:20 +0100 Subject: Issue #21663: Fixed error caused by trying to create an existing directory. --- Lib/venv/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v0.12