]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Fix bugs found by flake8.
authorBob Halley <halley@dnspython.org>
Fri, 12 Jun 2020 15:06:46 +0000 (08:06 -0700)
committerBob Halley <halley@dnspython.org>
Fri, 12 Jun 2020 15:06:46 +0000 (08:06 -0700)
dns/edns.py

index 2582213967679ef8246525ba0bd4d8d64adc8a72..d3df6f94d8f6108cb8e7b58f8e8da46f0be64c7e 100644 (file)
@@ -150,7 +150,7 @@ class GenericOption(Option):
         if file:
             file.write(self.data)
         else:
-            return data
+            return self.data
 
     def to_text(self):
         return "Generic %d" % self.otype
@@ -183,7 +183,7 @@ class ECSOption(Option):
         must be 0 in queries, and should be set in responses.
         """
 
-        super().__init__(ECS)
+        super().__init__(OptionType.ECS)
         af = dns.inet.af_for_address(address)
 
         if af == dns.inet.AF_INET6:
@@ -309,7 +309,7 @@ class ECSOption(Option):
         return self.to_text()
 
 _type_to_class = {
-        ECS: ECSOption
+    OptionType.ECS: ECSOption
 }
 
 def get_option_class(otype):