Skip to content

Commit

Permalink
Fix error for no category
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed May 7, 2023
1 parent 365a37b commit 7bd3aac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pyhon/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ async def _recover_last_command_states(self):
if last is None:
continue
parameters = command_history[last].get("command", {}).get("parameters", {})
if command.categories:
if command.categories and (
parameters.get("program") or parameters.get("category")
):
if parameters.get("program"):
command.category = parameters.pop("program").split(".")[-1].lower()
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="pyhOn",
version="0.10.3",
version="0.10.4",
author="Andre Basche",
description="Control hOn devices with python",
long_description=long_description,
Expand Down

0 comments on commit 7bd3aac

Please sign in to comment.