mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Improve virtual env detection
This commit is contained in:
parent
2cbfc60679
commit
dea0fcc845
@ -4,4 +4,5 @@ import sys
|
|||||||
|
|
||||||
def is_virtual():
|
def is_virtual():
|
||||||
""" Return if we run in a virtual environtment. """
|
""" Return if we run in a virtual environtment. """
|
||||||
return sys.base_prefix != sys.prefix
|
# Check supports venv && virtualenv
|
||||||
|
return sys.base_prefix != sys.prefix or hasattr(sys, 'real_prefix')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user