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
a6894ba3
Commit
a6894ba3
authored
Aug 24, 2012
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted change to venv initialisation.
parent
3bb6318a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
Lib/venv/__init__.py
Lib/venv/__init__.py
+1
-9
No files found.
Lib/venv/__init__.py
View file @
a6894ba3
...
...
@@ -105,15 +105,7 @@ class EnvBuilder:
if
os
.
path
.
exists
(
env_dir
)
and
not
(
self
.
clear
or
self
.
upgrade
):
raise
ValueError
(
'Directory exists: %s'
%
env_dir
)
if
os
.
path
.
exists
(
env_dir
)
and
self
.
clear
:
# Issue 15776: To support running pyvenv on '.', the venv
# directory contents are emptied and recreated, instead of
# the venv directory being deleted and recreated.
for
f
in
os
.
listdir
(
env_dir
):
f
=
os
.
path
.
join
(
env_dir
,
f
)
if
os
.
path
.
isdir
(
f
):
shutil
.
rmtree
(
f
)
else
:
os
.
remove
(
f
)
shutil
.
rmtree
(
env_dir
)
context
=
Context
()
context
.
env_dir
=
env_dir
context
.
env_name
=
os
.
path
.
split
(
env_dir
)[
1
]
...
...
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