Fix check for running inside venv (#8481)

* Import and use the function from pip instead of defining it
  ourselves.
* Fix tests.
This commit is contained in:
Martin Hjelmare authored and Paulus Schoutsen committed 2017-07-15 07:25:02 -07:00
1 parent 6ca828fd14
commit 543e8bb62e
5 files changed
+36 -24

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ def _async_process_requirements(hass: core.HomeAssistant, name: str,
def pip_install(mod):
"""Install packages."""
if pkg_util.is_virtual_env():
if pkg_util.running_under_virtualenv():
return pkg_util.install_package(
mod, constraints=os.path.join(
os.path.dirname(__file__), CONSTRAINT_FILE))