mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Remove workarounds for dnspython < 2.7.0
dnspython 2.7.0 is now required to run the BIND 9 system test suite.
Drop the workarounds for older dnspython versions as they are now
redundant.
(cherry picked from commit c9ceb191e8)
This commit is contained in:
parent
d33cf69161
commit
fb4fc513c9
1 changed files with 2 additions and 6 deletions
|
|
@ -32,12 +32,8 @@ def _get_cookie(qctx: QueryContext):
|
|||
for o in qctx.query.options:
|
||||
if o.otype == dns.edns.OptionType.COOKIE:
|
||||
cookie = o
|
||||
try:
|
||||
if len(cookie.server) == 0:
|
||||
cookie.server = b"\x11\x22\x33\x44\x55\x66\x77\x88"
|
||||
except AttributeError: # dnspython<2.7.0 compat
|
||||
if len(o.data) == 8:
|
||||
cookie.data *= 2
|
||||
if len(cookie.server) == 0:
|
||||
cookie.server = b"\x11\x22\x33\x44\x55\x66\x77\x88"
|
||||
|
||||
return cookie
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue