diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-04 23:05:16 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-04 23:05:16 +0200 |
commit | 6185fb4e9e3d3e654ad9f6325da0f4886013dda6 (patch) | |
tree | 81a767238fdd3b1902672330a49948d838acd2c7 /lib/dnspython/dns/opcode.py | |
parent | 5de2ec0def3e4ad0ead20b426e81509fd8e48c6d (diff) | |
download | samba-6185fb4e9e3d3e654ad9f6325da0f4886013dda6.tar.gz samba-6185fb4e9e3d3e654ad9f6325da0f4886013dda6.tar.bz2 samba-6185fb4e9e3d3e654ad9f6325da0f4886013dda6.zip |
dnspython: Update to latest upstream.
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 |