]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
linting
authorBob Halley <halley@dnspython.org>
Tue, 19 May 2020 12:51:31 +0000 (05:51 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 19 May 2020 12:51:31 +0000 (05:51 -0700)
dns/inet.py
dns/resolver.py
dns/trio/query.py

index 254b5d079f662d824a198ae29faff146967dca8d..f5b1fcb3eea65207fa6033148254d9727a3d6985 100644 (file)
@@ -138,4 +138,4 @@ def is_address(text):
             dns.ipv6.inet_aton(text, True)
             return True
         except Exception:
-            raise False
+            return False
index 474219a015593d2fcc6de86569a6909cee8ad9d7..30b554d00ce6c95960684f7b764abe9070a746e6 100644 (file)
@@ -522,6 +522,18 @@ class _Resolution(object):
         self.tcp = tcp
         self.raise_on_no_answer = raise_on_no_answer
         self.nxdomain_responses = {}
+        #
+        # Initialize other things to help analysis tools
+        self.qname = dns.name.empty
+        self.nameservers = []
+        self.current_nameservers = []
+        self.errors = []
+        self.nameserver = None
+        self.port = 0
+        self.tcp_attempt = False
+        self.retry_with_tcp = False
+        self.request = None
+        self.backoff = 0
 
     def next_request(self):
         """Get the next request to send, and check the cache.
index b4be84f9b391f3b9480dcd24ca7074fd4d732fb4..0fc605842affd58723bc3b032e9092f5c6990b66 100644 (file)
@@ -140,6 +140,8 @@ async def udp(q, where, port=53, source=None, source_port=0,
         r.time = received_time - sent_time
         return r
 
+# pylint: disable=redefined-outer-name
+
 async def send_stream(stream, what):
     """Asynchronously send a DNS message to the specified stream.