Skip to content

Commit

Permalink
Fix depreaction warnings and dnstap exception on (expected) broken pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Jun 14, 2023
1 parent 32d02db commit f47747d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion regression-tests.recursor-dnssec/test_Lua.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ def testDROP(self):
""" postresolve_ffi: test that we can do a DROP for a name and type combo"""
query = dns.message.make_query('example', 'TXT')
res = self.sendUDPQuery(query)
self.assertEquals(res, None)
self.assertEqual(res, None)

def testNXDOMAIN(self):
""" postresolve_ffi: test that we can return a NXDOMAIN for a name and type combo"""
Expand Down
4 changes: 2 additions & 2 deletions regression-tests.recursor-dnssec/test_Notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def testNotify(self):
sender = getattr(self, method)
res = sender(notify)
self.assertRcodeEqual(res, dns.rcode.NOERROR)
self.assertEquals(res.opcode(), 4)
self.assertEqual(res.opcode(), 4)
print(res)
self.assertEquals(res.question[0].to_text(), 'example. IN SOA')
self.assertEqual(res.question[0].to_text(), 'example. IN SOA')

self.checkRecordCacheMetrics(3, 1)

Expand Down
2 changes: 1 addition & 1 deletion regression-tests.recursor-dnssec/test_RecDnstap.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def FrameStreamUnixListener(cls, conn, param):
fstrm_handle_bidir_connection(conn, lambda data: \
param.queue.put(data, True, timeout=2.0))
except socket.error as e:
if e.errno == 9:
if e.errno == errno.EBADF or e.errno == errno.EPIPE
break
sys.stderr.write("Unexpected socket error %s\n" % str(e))
sys.exit(1)
Expand Down

0 comments on commit f47747d

Please sign in to comment.