From bb2159567856fe49e4ee3b96cb5e78175b1324e9 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 7 Jun 2018 09:31:12 +0200 Subject: [PATCH] Called parent constructor in ZeroBorg plugin to make sure that the logger instance is initialized --- platypush/plugins/gpio/zeroborg/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/gpio/zeroborg/__init__.py b/platypush/plugins/gpio/zeroborg/__init__.py index c005d08a5..2b24effd3 100644 --- a/platypush/plugins/gpio/zeroborg/__init__.py +++ b/platypush/plugins/gpio/zeroborg/__init__.py @@ -2,6 +2,8 @@ import enum import threading import time +import platypush.plugins.gpio.zeroborg.lib as ZeroBorg + from platypush.message.response import Response from platypush.plugins import Plugin from platypush.context import get_plugin @@ -23,8 +25,8 @@ class GpioZeroborgPlugin(Plugin): _direction = None - def __init__(self, directions = {}): - import platypush.plugins.gpio.zeroborg.lib as ZeroBorg + def __init__(self, directions = {}, *args, **kwargs): + super().__init__(*args, **kwargs) self.directions = directions self.auto_mode = False