The network object isn't always available on a ZWave event
This commit is contained in:
parent
aa66b81b7b
commit
51f99026ac
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ class ZwaveBackend(Backend):
|
||||||
|
|
||||||
def _process_event(self, event: _ZWEvent):
|
def _process_event(self, event: _ZWEvent):
|
||||||
from platypush.plugins.zwave import ZwavePlugin
|
from platypush.plugins.zwave import ZwavePlugin
|
||||||
network = event.network or self.network
|
network = event.network if hasattr(event, 'network') and event.network else self.network
|
||||||
|
|
||||||
if event.signal == network.SIGNAL_NETWORK_STOPPED or \
|
if event.signal == network.SIGNAL_NETWORK_STOPPED or \
|
||||||
event.signal == network.SIGNAL_DRIVER_REMOVED:
|
event.signal == network.SIGNAL_DRIVER_REMOVED:
|
||||||
|
|
Loading…
Reference in a new issue