From: Douglas Bagnall Date: Wed, 2 Dec 2020 22:57:48 +0000 (+0000) Subject: pytests: dns_base: remove a py2 compat thing X-Git-Tag: tevent-0.11.0~1467 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94d7378fa23583f7fd7aa92ace089443b27a5efe;p=thirdparty%2Fsamba.git pytests: dns_base: remove a py2 compat thing Signed-off-by: Douglas Bagnall Reviewed-by: Jeremy Allison --- diff --git a/python/samba/tests/dns_base.py b/python/samba/tests/dns_base.py index a5c7c5eb982..5c0d6201b06 100644 --- a/python/samba/tests/dns_base.py +++ b/python/samba/tests/dns_base.py @@ -298,10 +298,7 @@ class DNSTKeyTest(DNSTest): # so it can be modified response_packet_list = [x if isinstance(x, int) else ord(x) for x in response_packet] del response_packet_list[-tsig_record_len:] - if isinstance(response_packet_list[11], int): - response_packet_list[11] = 0 - else: - response_packet_list[11] = chr(0) + response_packet_list[11] = 0 # convert modified list (of string char or int) to str/bytes response_packet_wo_tsig = bytes(response_packet_list)