mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-13 14:44:28 -04:00
Add flake8 config
This commit is contained in:
parent
4f7d4860db
commit
22367242a2
4 changed files with 10 additions and 5 deletions
|
@ -28,7 +28,7 @@ class HonCommand:
|
|||
category_name: str = "",
|
||||
):
|
||||
self._name: str = name
|
||||
self._api: Optional[HonAPI] = appliance.api
|
||||
self._api: Optional[HonAPI] = None
|
||||
self._appliance: "HonAppliance" = appliance
|
||||
self._categories: Optional[Dict[str, "HonCommand"]] = categories
|
||||
self._category_name: str = category_name
|
||||
|
@ -48,6 +48,8 @@ class HonCommand:
|
|||
|
||||
@property
|
||||
def api(self) -> "HonAPI":
|
||||
if self._api is None and self._appliance:
|
||||
self._api = self._appliance.api
|
||||
if self._api is None:
|
||||
raise exceptions.NoAuthenticationException("Missing hOn login")
|
||||
return self._api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue