Do not crash cli on missing discovery info (#735)

This commit is contained in:
Teemu R 2024-02-03 15:28:51 +01:00 committed by GitHub
parent fae071f0df
commit 6afd05be59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -471,6 +471,10 @@ def _echo_dictionary(discovery_info: dict):
def _echo_discovery_info(discovery_info):
# We don't have discovery info when all connection params are passed manually
if discovery_info is None:
return
if "system" in discovery_info and "get_sysinfo" in discovery_info["system"]:
_echo_dictionary(discovery_info["system"]["get_sysinfo"])
return