From 51f99026ac7e8523887612bee4563d1e1b855076 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 17 May 2020 12:56:01 +0200 Subject: [PATCH] The network object isn't always available on a ZWave event --- platypush/backend/zwave/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/backend/zwave/__init__.py b/platypush/backend/zwave/__init__.py index 77cc3d384..60648d632 100644 --- a/platypush/backend/zwave/__init__.py +++ b/platypush/backend/zwave/__init__.py @@ -148,7 +148,7 @@ class ZwaveBackend(Backend): def _process_event(self, event: _ZWEvent): 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 \ event.signal == network.SIGNAL_DRIVER_REMOVED: