Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c557f2 commit c07aa9eCopy full SHA for c07aa9e
1 file changed
Lib/venv/__init__.py
@@ -37,15 +37,10 @@
37
import threading
38
except ImportError:
39
threading = None
40
+import types
41
42
logger = logging.getLogger(__name__)
43
-class Context:
44
- """
45
- Holds information about a current venv creation/upgrade request.
46
47
- pass
48
-
49
50
class EnvBuilder:
51
"""
@@ -108,7 +103,7 @@ def create_if_needed(d):
108
103
raise ValueError('Directory exists: %s' % env_dir)
109
104
if os.path.exists(env_dir) and self.clear:
110
105
shutil.rmtree(env_dir)
111
- context = Context()
106
+ context = types.SimpleNamespace()
112
107
context.env_dir = env_dir
113
context.env_name = os.path.split(env_dir)[1]
114
context.prompt = '(%s) ' % context.env_name
0 commit comments