mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Catch all request timeouts for winrm connection (#54104)
* Catch all request timeouts for winrm connection The current implementation only catches 'ConnectTimeout' exceptions. Instead we should catch 'Timout' which also catches ReadTimeout exceptions. Improves on: #51744 Co-Authored-By: westphahl <westphahl@gmail.com> * Changelog for winrm error handling improvement
This commit is contained in:
parent
e2d2874d81
commit
a44dfed570
2 changed files with 5 additions and 1 deletions
|
@ -489,7 +489,7 @@ class Connection(ConnectionBase):
|
|||
% (to_native(response.std_out), to_native(stderr)))
|
||||
|
||||
return response
|
||||
except requests.exceptions.ConnectionError as exc:
|
||||
except requests.exceptions.Timeout as exc:
|
||||
raise AnsibleConnectionFailure('winrm connection error: %s' % to_native(exc))
|
||||
finally:
|
||||
if command_id:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue