From d621162a9bc62fdf77d0fe1997564aaf38d031c0 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 16:36:52 +0200 Subject: [PATCH] Codestyle --- NetworkPrinterOutputDevicePlugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/NetworkPrinterOutputDevicePlugin.py b/NetworkPrinterOutputDevicePlugin.py index 8d4ea516e8..5f0352ff3e 100644 --- a/NetworkPrinterOutputDevicePlugin.py +++ b/NetworkPrinterOutputDevicePlugin.py @@ -5,14 +5,18 @@ from zeroconf import Zeroconf, ServiceBrowser, ServiceStateChange from UM.Signal import Signal, SignalEmitter from UM.Application import Application + class WifiOutputDevicePlugin(OutputDevicePlugin, SignalEmitter): def __init__(self): super().__init__() self._zero_conf = Zeroconf() self._browser = None self._connections = {} - self.addConnectionSignal.connect(self.addConnection) #Because the model needs to be created in the same thread as the QMLEngine, we use a signal. + + # Because the model needs to be created in the same thread as the QMLEngine, we use a signal. + self.addConnectionSignal.connect(self.addConnection) Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineInstanceChanged) + addConnectionSignal = Signal() ## Start looking for devices on network. @@ -31,7 +35,6 @@ class WifiOutputDevicePlugin(OutputDevicePlugin, SignalEmitter): self._connections[address].connectionStateChanged.connect(self._onPrinterConnectionStateChanged) else: self._connections[address].close() - print("on active machine instance changed" , active_machine_key) ## Because the model needs to be created in the same thread as the QMLEngine, we use a signal. def addConnection(self, name, address, properties):