mirror of
https://github.com/naruxde/revpipyload.git
synced 2025-11-08 23:23:52 +01:00
Fix compile error on older Python3 versions
This commit is contained in:
@@ -175,11 +175,11 @@ class RevPiSlave(Thread):
|
|||||||
proginit.logger.debug("leave RevPiSlave.stop()")
|
proginit.logger.debug("leave RevPiSlave.stop()")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def watchdog(self) -> bool:
|
def watchdog(self):
|
||||||
return self._watchdog
|
return self._watchdog
|
||||||
|
|
||||||
@watchdog.setter
|
@watchdog.setter
|
||||||
def watchdog(self, value: bool):
|
def watchdog(self, value):
|
||||||
self._watchdog = value
|
self._watchdog = value
|
||||||
for th in self._th_dev: # type: RevPiSlaveDev
|
for th in self._th_dev: # type: RevPiSlaveDev
|
||||||
th.watchdog = value
|
th.watchdog = value
|
||||||
@@ -192,7 +192,7 @@ class RevPiSlaveDev(Thread):
|
|||||||
Netzwerk mit dem Prozessabbild auszutauschen.
|
Netzwerk mit dem Prozessabbild auszutauschen.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, devcon, acl, watchdog: bool):
|
def __init__(self, devcon, acl, watchdog):
|
||||||
"""Init RevPiSlaveDev-Class.
|
"""Init RevPiSlaveDev-Class.
|
||||||
|
|
||||||
@param devcon Tuple der Verbindung
|
@param devcon Tuple der Verbindung
|
||||||
@@ -333,7 +333,7 @@ class RevPiSlaveDev(Thread):
|
|||||||
# Header: ppllbuff
|
# Header: ppllbuff
|
||||||
index = 0
|
index = 0
|
||||||
while index < length:
|
while index < length:
|
||||||
r_position, r_length = unpack("=HH", buff_recv[index: index + 4])
|
r_position, r_length = unpack("=HH", buff_recv[index:index + 4])
|
||||||
index += 4
|
index += 4
|
||||||
|
|
||||||
fh_proc.seek(r_position)
|
fh_proc.seek(r_position)
|
||||||
|
|||||||
Reference in New Issue
Block a user