Skip to content

Commit

Permalink
Update environment.py
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius authored Sep 23, 2024
1 parent ff8bbe4 commit 3cabf79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipenv/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def safe_import(self, name: str) -> ModuleType:

@cached_property
def python_version(self) -> str | None:
with self.activated() as e:
if e.ok:
with self.activated() as active:
if active:
sysconfig = self.safe_import("sysconfig")
py_version = sysconfig.get_python_version()
return py_version
Expand Down

0 comments on commit 3cabf79

Please sign in to comment.