Skip to content

Commit

Permalink
Fix none-type attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed May 8, 2023
1 parent 8e16b4a commit 022da71
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 @@ -7,6 +7,7 @@

from pyhon import helper, exceptions
from pyhon.commands import HonCommand
from pyhon.parameter.base import HonParameter
from pyhon.parameter.fixed import HonParameterFixed

if TYPE_CHECKING:
Expand All @@ -33,6 +34,7 @@ def __init__(
self._zone: int = zone
self._additional_data: Dict[str, Any] = {}
self._last_update = None
self._default_setting = HonParameter("", {}, "")

try:
self._extra = importlib.import_module(
Expand Down Expand Up @@ -229,7 +231,7 @@ def settings(self):
result = {}
for name, command in self._commands.items():
for key in command.setting_keys:
setting = command.settings.get(key)
setting = command.settings.get(key, self._default_setting)
result[f"{name}.{key}"] = setting
if self._extra:
return self._extra.settings(result)
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.5",
version="0.10.6",
author="Andre Basche",
description="Control hOn devices with python",
long_description=long_description,
Expand Down

0 comments on commit 022da71

Please sign in to comment.