Skip to content
Snippets Groups Projects
Commit 5ce4fe65 authored by Jason Hu's avatar Jason Hu Committed by Paulus Schoutsen
Browse files

Allow skip-pip applied to HA core (#21527)

parent 4f4a8a61
No related branches found
No related tags found
No related merge requests found
...@@ -85,6 +85,11 @@ async def async_from_config_dict(config: Dict[str, Any], ...@@ -85,6 +85,11 @@ async def async_from_config_dict(config: Dict[str, Any],
async_enable_logging(hass, verbose, log_rotate_days, log_file, async_enable_logging(hass, verbose, log_rotate_days, log_file,
log_no_color) log_no_color)
hass.config.skip_pip = skip_pip
if skip_pip:
_LOGGER.warning("Skipping pip installation of required modules. "
"This may cause issues")
core_config = config.get(core.DOMAIN, {}) core_config = config.get(core.DOMAIN, {})
has_api_password = bool(config.get('http', {}).get('api_password')) has_api_password = bool(config.get('http', {}).get('api_password'))
trusted_networks = config.get('http', {}).get('trusted_networks') trusted_networks = config.get('http', {}).get('trusted_networks')
...@@ -104,11 +109,6 @@ async def async_from_config_dict(config: Dict[str, Any], ...@@ -104,11 +109,6 @@ async def async_from_config_dict(config: Dict[str, Any],
await hass.async_add_executor_job( await hass.async_add_executor_job(
conf_util.process_ha_config_upgrade, hass) conf_util.process_ha_config_upgrade, hass)
hass.config.skip_pip = skip_pip
if skip_pip:
_LOGGER.warning("Skipping pip installation of required modules. "
"This may cause issues")
# Make a copy because we are mutating it. # Make a copy because we are mutating it.
config = OrderedDict(config) config = OrderedDict(config)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment