file.write(bytes(self.numberOfBytes))
return None
+ @classmethod
def from_wire(cls, otype, wire, current, olen):
"""Read EDNS packet as defined in rfc7830.
return cls(numberOfBytes)
- from_wire = classmethod(from_wire)
-
# needed in 2.0.0
@classmethod
def from_wire_parser(cls, otype, parser):
def __eq__(self, other):
if not isinstance(other, PaddingOption):
return False
- return self.numberOfBytes == numberOfBytes
+ return self.numberOfBytes == other.numberOfBytes
def __ne__(self, other):
return not self.__eq__(other)