mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-08 22:07:06 +00:00
Do not crash cli on missing discovery info (#735)
This commit is contained in:
parent
fae071f0df
commit
6afd05be59
@ -471,6 +471,10 @@ def _echo_dictionary(discovery_info: dict):
|
|||||||
|
|
||||||
|
|
||||||
def _echo_discovery_info(discovery_info):
|
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"]:
|
if "system" in discovery_info and "get_sysinfo" in discovery_info["system"]:
|
||||||
_echo_dictionary(discovery_info["system"]["get_sysinfo"])
|
_echo_dictionary(discovery_info["system"]["get_sysinfo"])
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user