mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2024-11-15 17:10:46 +00:00
initialize stop_event to None
in case outbound mode enabled
This commit is contained in:
parent
f082fa8ac5
commit
4af7c0f694
@ -50,6 +50,7 @@ class VbanCmd(metaclass=ABCMeta):
|
|||||||
self._pdirty = False
|
self._pdirty = False
|
||||||
self._ldirty = False
|
self._ldirty = False
|
||||||
self._script = str()
|
self._script = str()
|
||||||
|
self.stop_event = None
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
@ -109,7 +110,7 @@ class VbanCmd(metaclass=ABCMeta):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def stopped(self):
|
def stopped(self):
|
||||||
return self.stop_event.is_set()
|
return self.stop_event is None or self.stop_event.is_set()
|
||||||
|
|
||||||
def _set_rt(self, cmd: str, val: Union[str, float]):
|
def _set_rt(self, cmd: str, val: Union[str, float]):
|
||||||
"""Sends a string request command over a network."""
|
"""Sends a string request command over a network."""
|
||||||
|
Loading…
Reference in New Issue
Block a user