dns.opcode.from_flags(). This avoids subsequent to_text issues and other
type confusion if the values were allowed to remain IntFlags.
Returns an ``int``.
"""
- return dns.rcode.from_flags(self.flags, self.ednsflags)
+ return dns.rcode.from_flags(int(self.flags), int(self.ednsflags))
def set_rcode(self, rcode):
"""Set the rcode.
Returns an ``int``.
"""
- return dns.opcode.from_flags(self.flags)
+ return dns.opcode.from_flags(int(self.flags))
def set_opcode(self, opcode):
"""Set the opcode.