Agent: Log exception information on dcom.disconnect() key error

This commit is contained in:
Mike Salvatore 2022-03-10 12:00:27 -05:00
parent d9ee377945
commit dd2168e838
1 changed files with 1 additions and 2 deletions

View File

@ -67,8 +67,7 @@ class WmiTools(object):
try: try:
dcom.disconnect() dcom.disconnect()
except KeyError: except KeyError:
# No connection to disconnect logger.exception("Disconnecting the DCOMConnection failed")
pass
if "rpc_s_access_denied" == exc.error_string: if "rpc_s_access_denied" == exc.error_string:
raise AccessDeniedException(host, username, password, domain) raise AccessDeniedException(host, username, password, domain)