Skip to content

Commit

Permalink
small improvment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mips2648 committed Dec 22, 2024
1 parent 499fd65 commit a3e9318
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions resources/demond/jeedom/jeedom.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def __post_change(self, change):
return True
else:
logging.warning('Error on send request to jeedom, return code %s', r.status_code)
time.sleep(0.5)
except Exception as error:
logging.error('Error on send request to jeedom "%s" retry: %i/%i', error, i, self._retry)
time.sleep(0.5)
return False

def set_change(self, changes):
Expand Down Expand Up @@ -158,7 +158,7 @@ def stripped(str):
return "".join([i for i in str if i in range(32, 127)])

@staticmethod
def ByteToHex(byteStr):
def ByteToHex(byteStr: bytes):
return byteStr.hex()

@staticmethod
Expand Down Expand Up @@ -318,7 +318,3 @@ def close(self):

def getMessage(self):
return self.message

# ------------------------------------------------------------------------------
# END
# ------------------------------------------------------------------------------

0 comments on commit a3e9318

Please sign in to comment.