Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a170a7

Browse files
committed
Issue #21663: Fixed error caused by trying to create an existing directory.
1 parent 7be121f commit 1a170a7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/venv/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ def setup_python(self, context):
238238
if 'init.tcl' in files:
239239
tcldir = os.path.basename(root)
240240
tcldir = os.path.join(context.env_dir, 'Lib', tcldir)
241-
os.makedirs(tcldir)
241+
if not os.path.exists(tcldir):
242+
os.makedirs(tcldir)
242243
src = os.path.join(root, 'init.tcl')
243244
dst = os.path.join(tcldir, 'init.tcl')
244245
shutil.copyfile(src, dst)

0 commit comments

Comments
 (0)