mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
ef4509e779
commit
20fff15e89
1 changed files with 2 additions and 2 deletions
|
@ -310,8 +310,8 @@ def runas_system(cmd, username, password):
|
|||
|
||||
except win32security.error as exc:
|
||||
# User doesn't have admin, use existing token
|
||||
if exc[0] == winerror.ERROR_NO_SUCH_LOGON_SESSION \
|
||||
or exc[0] == winerror.ERROR_PRIVILEGE_NOT_HELD:
|
||||
if exc.winerror == winerror.ERROR_NO_SUCH_LOGON_SESSION \
|
||||
or exc.winerror == winerror.ERROR_PRIVILEGE_NOT_HELD:
|
||||
elevated_token = token
|
||||
else:
|
||||
raise
|
||||
|
|
Loading…
Add table
Reference in a new issue