mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Improve virtual env detection
This commit is contained in:
parent
2cbfc60679
commit
dea0fcc845
@ -4,4 +4,5 @@ import sys
|
||||
|
||||
def is_virtual():
|
||||
""" 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