diff options
Diffstat (limited to 'lib/dnspython/dns/opcode.py')
-rw-r--r-- | lib/dnspython/dns/opcode.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dnspython/dns/opcode.py b/lib/dnspython/dns/opcode.py index 735d3a1f7d..705bd09a43 100644 --- a/lib/dnspython/dns/opcode.py +++ b/lib/dnspython/dns/opcode.py @@ -66,7 +66,7 @@ def from_flags(flags): @param flags: int @rtype: int """ - + return (flags & 0x7800) >> 11 def to_flags(value): @@ -74,9 +74,9 @@ def to_flags(value): flags. @rtype: int """ - + return (value << 11) & 0x7800 - + def to_text(value): """Convert an opcode to text. @@ -85,7 +85,7 @@ def to_text(value): @raises UnknownOpcode: the opcode is unknown @rtype: string """ - + text = _by_value.get(value) if text is None: text = str(value) @@ -98,7 +98,7 @@ def is_update(flags): @type flags: int @rtype: bool """ - + if (from_flags(flags) == UPDATE): return True return False |