Changes methods that do not reference the instance to static methods

This commit is contained in:
vieira
2017-11-07 22:23:44 +00:00
committed by Brian May
parent ad676029c7
commit 112931dd2c
4 changed files with 31 additions and 18 deletions

View File

@ -175,7 +175,8 @@ class DnsProxy(Handler):
self.to_nameserver = self._addrinfo(peer, port)
self.try_send()
def _addrinfo(self, peer, port):
@staticmethod
def _addrinfo(peer, port):
if int(port) == 0:
port = 53
family, _, _, _, sockaddr = socket.getaddrinfo(peer, port)[0]