]> granicus.if.org Git - python/commitdiff
Issue #21663: Fixed error caused by trying to create an existing directory.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 5 Jun 2014 08:31:20 +0000 (09:31 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 5 Jun 2014 08:31:20 +0000 (09:31 +0100)
Lib/venv/__init__.py

index b5ef2d88e99ffe9e0aef1dca2df3ec5c3de8d089..3a7e8e257a84f995a892c03451d505fb57341077 100644 (file)
@@ -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)