From: Joseph Sutton Date: Thu, 25 May 2023 00:20:06 +0000 (+1200) Subject: tests/audit_log: Remove unnecessary checks X-Git-Tag: talloc-2.4.1~542 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d68ef23b3280675d45eb85db7653f2bceaf10c7;p=thirdparty%2Fsamba.git tests/audit_log: Remove unnecessary checks These attributes are always truthy. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/audit_log_base.py b/python/samba/tests/audit_log_base.py index 621e51da372..50b941270fe 100644 --- a/python/samba/tests/audit_log_base.py +++ b/python/samba/tests/audit_log_base.py @@ -126,12 +126,10 @@ class AuditLogTestBase(samba.tests.TestCase): self.discardMessages() self.msg_ctx.irpc_remove_name(self.event_type) self.msg_ctx.irpc_remove_name(AUTH_EVENT_NAME) - if self.msg_handler_and_context: - self.msg_ctx.deregister(self.msg_handler_and_context, - msg_type=self.message_type) - if self.auth_handler_and_context: - self.msg_ctx.deregister(self.auth_handler_and_context, - msg_type=MSG_AUTH_LOG) + self.msg_ctx.deregister(self.msg_handler_and_context, + msg_type=self.message_type) + self.msg_ctx.deregister(self.auth_handler_and_context, + msg_type=MSG_AUTH_LOG) def haveExpected(self, expected, dn): if dn is None: