controls/DiscoveryPanel.py
changeset 2492 7dd551ac2fa0
parent 2482 cb53d3bf3380
child 2521 48ebcbe7f19b
--- a/controls/DiscoveryPanel.py	Thu Mar 07 21:57:18 2019 +0100
+++ b/controls/DiscoveryPanel.py	Mon Mar 11 01:03:32 2019 +0100
@@ -30,7 +30,6 @@
 import wx
 import wx.lib.mixins.listctrl as listmix
 from zeroconf import ServiceBrowser, Zeroconf, get_all_addresses
-import netifaces
 
 service_type = '_Beremiz._tcp.local.'
 
@@ -41,6 +40,7 @@
         wx.ListCtrl.__init__(self, parent, id, pos, size, style, name=name)
         listmix.ListCtrlAutoWidthMixin.__init__(self)
 
+
 class DiscoveryPanel(wx.Panel, listmix.ColumnSorterMixin):
 
     def _init_coll_MainSizer_Items(self, parent):
@@ -129,7 +129,7 @@
         self.IfacesMonitorState = None
         self.IfacesMonitorTimer = wx.Timer(self)
         self.IfacesMonitorTimer.Start(2000)
-        self.Bind(wx.EVT_TIMER, self.IfacesMonitor , self.IfacesMonitorTimer)
+        self.Bind(wx.EVT_TIMER, self.IfacesMonitor, self.IfacesMonitorTimer)
 
     def __del__(self):
         self.IfacesMonitorTimer.Stop()
@@ -139,7 +139,7 @@
     def IfacesMonitor(self, event):
         NewState = get_all_addresses(socket.AF_INET)
 
-        if self.IfacesMonitorState != NewState: 
+        if self.IfacesMonitorState != NewState:
             if self.IfacesMonitorState is not None:
                 # refresh only if a new address appeared
                 for addr in NewState:
@@ -192,7 +192,7 @@
         if self.LatestSelection is not None:
             # if self.ByIPCheck.IsChecked():
             svcname, scheme, host, port = \
-                map(lambda col:self.getColumnText(self.LatestSelection, col),
+                map(lambda col: self.getColumnText(self.LatestSelection, col),
                     range(4))
             return ("%s://%s:%s#%s" % (scheme, host, port, svcname)) \
                 if scheme[-1] == "S" \