Skip to content

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Orru <simone.orru@secomind.com>
  • Loading branch information
sorru94 committed Sep 25, 2023
1 parent d05540c commit c703bd0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions astarte/device/device_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ def add_interface_from_json(self, interface_json: dict):
----------
interface_json : dict
See parent class.
Raises
------
DeviceConnectingError
When attempting to add an interface while the device if performing a connection.
"""
if self.__is_connecting:
raise DeviceConnectingError("Interfaces cannot be added while device is connecting.")
Expand All @@ -195,6 +200,13 @@ def remove_interface(self, interface_name: str) -> None:
----------
interface_name : str
See parent class.
Raises
------
DeviceConnectingError
When attempting to add an interface while the device if performing a connection.
InterfaceNotFoundError
When the provided interface can't be found in the device introspection.
"""
if self.__is_connecting:
raise DeviceConnectingError("Interfaces cannot be removed while device is connecting.")
Expand Down

0 comments on commit c703bd0

Please sign in to comment.