From: Bob Halley Date: Fri, 12 Jun 2020 15:06:46 +0000 (-0700) Subject: Fix bugs found by flake8. X-Git-Tag: v2.0.0rc1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54b908b1dc23712867d14d6dc388100c374b7bf8;p=thirdparty%2Fdnspython.git Fix bugs found by flake8. --- diff --git a/dns/edns.py b/dns/edns.py index 25822139..d3df6f94 100644 --- a/dns/edns.py +++ b/dns/edns.py @@ -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):