controls/DiscoveryPanel.py
branchpython3
changeset 3750 f62625418bff
parent 3717 da9ffd572551
child 3752 9f6f46dbe3ae
--- a/controls/DiscoveryPanel.py	Mon Mar 27 10:19:14 2023 +0200
+++ b/controls/DiscoveryPanel.py	Fri Oct 28 12:39:15 2022 +0800
@@ -24,7 +24,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 
-from __future__ import absolute_import
+
 import socket
 from six.moves import xrange
 import wx
@@ -203,8 +203,7 @@
         if self.LatestSelection is not None:
             # if self.ByIPCheck.IsChecked():
             svcname, scheme, host, port = \
-                map(lambda col: self.getColumnText(self.LatestSelection, col),
-                    range(4))
+                [self.getColumnText(self.LatestSelection, col) for col in range(4)]
             return ("%s://%s:%s#%s" % (scheme, host, port, svcname)) \
                 if scheme[-1] == "S" \
                 else ("%s://%s:%s" % (scheme, host, port))
@@ -223,7 +222,7 @@
         '''
 
         # loop through the list items looking for the service that went offline
-        for idx in xrange(self.ServicesList.GetItemCount()):
+        for idx in range(self.ServicesList.GetItemCount()):
             # this is the unique identifier assigned to the item
             item_id = self.ServicesList.GetItemData(idx)