From 54b908b1dc23712867d14d6dc388100c374b7bf8 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Fri, 12 Jun 2020 08:06:46 -0700 Subject: [PATCH] Fix bugs found by flake8. --- dns/edns.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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): -- 2.47.3