[Python-checkins] cpython (3.4): Issue #21663: Fixed error caused by trying to create an existing directory.

vinay.sajip python-checkins at python.org
Thu Jun 5 10:32:38 CEST 2014


http://hg.python.org/cpython/rev/477e71004040
changeset: 91029:477e71004040
branch: 3.4
parent: 91027:723e1b414501
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Thu Jun 05 09:31:20 2014 +0100
summary:
 Issue #21663: Fixed error caused by trying to create an existing directory.
files:
 Lib/venv/__init__.py | 3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -238,7 +238,8 @@
 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)
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /