Guard partial upgrade (#54617)

This commit is contained in:
Paulus Schoutsen 2021-08-15 19:56:56 -07:00 committed by GitHub
parent 41d932fcf8
commit bab7d46c9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,6 +65,11 @@ def async_setup_forwarded(
try:
from hass_nabucasa import remote # pylint: disable=import-outside-toplevel
# venv users might have already loaded it before it got upgraded so guard for this
# This can only happen when people upgrade from before 2021.8.5.
if not hasattr(remote, "is_cloud_request"):
remote = None
except ImportError:
remote = None