forked from p34709852/monkey
Agent: fix access denied error handling in wmi_tools.py
This commit is contained in:
parent
27e3cc6b4c
commit
d9ee377945
|
@ -64,9 +64,13 @@ class WmiTools(object):
|
|||
wmi.CLSID_WbemLevel1Login, wmi.IID_IWbemLevel1Login
|
||||
)
|
||||
except Exception as exc:
|
||||
dcom.disconnect()
|
||||
try:
|
||||
dcom.disconnect()
|
||||
except KeyError:
|
||||
# No connection to disconnect
|
||||
pass
|
||||
|
||||
if "rpc_s_access_denied" == exc:
|
||||
if "rpc_s_access_denied" == exc.error_string:
|
||||
raise AccessDeniedException(host, username, password, domain)
|
||||
|
||||
raise
|
||||
|
|
Loading…
Reference in New Issue