Skip to content

Commit

Permalink
Do not crash cli on missing discovery info (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Feb 3, 2024
1 parent fae071f commit 6afd05b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kasa/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6afd05b

Please sign in to comment.