ECSOption and GenericOption both contained a __str__ method that called
to_text(), but the base Option class did not. Move __str__ to the base
class.
return NotImplemented
return self._cmp(other) > 0
+ def __str__(self):
+ return self.to_text()
+
class GenericOption(Option):
def from_wire_parser(cls, otype, parser):
return cls(otype, parser.get_remaining())
- def __str__(self):
- return self.to_text()
class ECSOption(Option):
"""EDNS Client Subnet (ECS, RFC7871)"""
return cls(addr, src, scope)
- def __str__(self):
- return self.to_text()
-
_type_to_class = {
OptionType.ECS: ECSOption