mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Change exceptions to python3 syntax.
This commit is contained in:
parent
62c08d96e5
commit
6747f82547
22 changed files with 38 additions and 38 deletions
|
@ -147,7 +147,7 @@ class Connection(object):
|
|||
cmd_parts = powershell._encode_script(script, as_list=True)
|
||||
try:
|
||||
result = self._winrm_exec(cmd_parts[0], cmd_parts[1:], from_exec=True)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
raise errors.AnsibleError("failed to exec cmd %s" % cmd)
|
||||
return (result.status_code, '', result.std_out.encode('utf-8'), result.std_err.encode('utf-8'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue