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:
Michał Kępień 2026-05-21 11:52:56 +02:00
parent d33cf69161
commit fb4fc513c9
No known key found for this signature in database

View file

@ -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