From a3e93181e7787d08252c76579dfa667a83aee830 Mon Sep 17 00:00:00 2001 From: Mips2648 Date: Sun, 22 Dec 2024 09:23:40 +0100 Subject: [PATCH] small improvment --- resources/demond/jeedom/jeedom.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/resources/demond/jeedom/jeedom.py b/resources/demond/jeedom/jeedom.py index b4ceea8..0717b1e 100644 --- a/resources/demond/jeedom/jeedom.py +++ b/resources/demond/jeedom/jeedom.py @@ -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): @@ -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 @@ -318,7 +318,3 @@ def close(self): def getMessage(self): return self.message - -# ------------------------------------------------------------------------------ -# END -# ------------------------------------------------------------------------------