♻ Remove no longer needed compatibility layer

This commit is contained in:
Gina Häußge committed 2020-07-31 15:12:51 +02:00
1 parent ffde393c66
commit 05cd917693
1 file changed
+2 -7
+2 -7
View File
@@ -308,13 +308,8 @@ class DiscoveryPlugin(octoprint.plugin.StartupPlugin,
return dict(name=n, host=address, port=p, txt_record=info.properties)
if hasattr(info, "addresses"):
# Python 3
for address in map(lambda x: socket.inet_ntoa(x), info.addresses):
result.append(to_result(info, address))
else:
# Python 2
result.append(to_result(info, socket.inet_ntoa(info.address)))
for address in map(lambda x: socket.inet_ntoa(x), info.addresses):
result.append(to_result(info, address))
self._logger.debug("Browsing Zeroconf for {service_type}".format(service_type=service_type))