Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3746619b
Commit
3746619b
authored
Feb 02, 2017
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Plain Diff
Fixes #29213: merged fix from 3.5.
parents
993f535a
db38b6c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
Lib/venv/__init__.py
Lib/venv/__init__.py
+4
-6
Lib/venv/scripts/nt/Activate.ps1
Lib/venv/scripts/nt/Activate.ps1
+1
-1
No files found.
Lib/venv/__init__.py
View file @
3746619b
...
...
@@ -320,19 +320,17 @@ class EnvBuilder:
dstfile
=
os
.
path
.
join
(
dstdir
,
f
)
with
open
(
srcfile
,
'rb'
)
as
f
:
data
=
f
.
read
()
if
srcfile
.
endswith
(
'.exe'
):
mode
=
'wb'
else
:
mode
=
'w'
if
not
srcfile
.
endswith
(
'.exe'
):
try
:
data
=
data
.
decode
(
'utf-8'
)
data
=
self
.
replace_variables
(
data
,
context
)
except
UnicodeDecodeError
as
e
:
data
=
data
.
encode
(
'utf-8'
)
except
UnicodeError
as
e
:
data
=
None
logger
.
warning
(
'unable to copy script %r, '
'may be binary: %s'
,
srcfile
,
e
)
if
data
is
not
None
:
with
open
(
dstfile
,
mode
)
as
f
:
with
open
(
dstfile
,
'wb'
)
as
f
:
f
.
write
(
data
)
shutil
.
copymode
(
srcfile
,
dstfile
)
...
...
Lib/venv/scripts/nt/Activate.ps1
View file @
3746619b
...
...
@@ -26,7 +26,7 @@ function global:deactivate ([switch]$NonDestructive) {
}
deactivate
-nondestructive
$
env
:
VIRTUAL_ENV
=
"__VENV_DIR__"
if
(
!
$
env
:
VIRTUAL_ENV_DISABLE_PROMPT
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment