[Python-checkins] cpython (3.4): Don't chmod() if path is a symlink.

barry.warsaw python-checkins at python.org
Wed Jun 4 20:14:16 CEST 2014


http://hg.python.org/cpython/rev/36a4f8b60d57
changeset:   91014:36a4f8b60d57
branch:      3.4
parent:      91011:bf8710cf896b
user:        Barry Warsaw <barry at python.org>
date:        Wed Jun 04 14:11:46 2014 -0400
summary:
  Don't chmod() if path is a symlink.

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
@@ -215,7 +215,8 @@
                     # Issue 18807: make copies if
                     # symlinks are not wanted
                     copier(context.env_exe, path)
-                    os.chmod(path, 0o755)
+                    if not os.path.islink(path):
+                        os.chmod(path, 0o755)
         else:
             subdir = 'DLLs'
             include = self.include_binary

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list