From af2dbf899d912c4a7b070e37e0421a554475e4cb Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 14 Aug 2020 20:53:20 +0200 Subject: [PATCH] Importing Zeroconf inside of the method to prevent Travic-CI from breaking because of module not found --- platypush/backend/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/backend/__init__.py b/platypush/backend/__init__.py index 7ccc0d88..d8a9815e 100644 --- a/platypush/backend/__init__.py +++ b/platypush/backend/__init__.py @@ -16,7 +16,6 @@ from platypush.bus import Bus from platypush.config import Config from platypush.context import get_backend from platypush.message.event.zeroconf import ZeroconfServiceAddedEvent, ZeroconfServiceRemovedEvent -from platypush.plugins.zeroconf import ZeroconfListener from platypush.utils import set_timeout, clear_timeout, \ get_redis_queue_name_by_message, set_thread_name @@ -328,6 +327,7 @@ class Backend(Thread, EventGenerator): """ try: from zeroconf import ServiceInfo, Zeroconf + from platypush.plugins.zeroconf import ZeroconfListener except ImportError: self.logger.warning('zeroconf package not available, service discovery will be disabled.') return