summaryrefslogtreecommitdiff
path: root/portato/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/__init__.py')
-rw-r--r--portato/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/portato/__init__.py b/portato/__init__.py
index 76c6198..4b6a808 100644
--- a/portato/__init__.py
+++ b/portato/__init__.py
@@ -58,5 +58,12 @@ logging.getLogger("portatoLogger").addHandler(handler)
logging.getLogger("portatoLogger").setLevel(logging.DEBUG)
logging.getLogger("portatoLogger").propagate = False
-from .plistener import PListener
-listener = PListener()
+__listener = None
+
+def get_listener():
+ global __listener
+ if __listener is None:
+ from .plistener import PListener
+ __listener = PListener()
+
+ return __listener