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:
dcom.disconnect()
except KeyError:
# No connection to disconnect
pass
logger.exception("Disconnecting the DCOMConnection failed")
if "rpc_s_access_denied" == exc.error_string:
raise AccessDeniedException(host, username, password, domain)