Skip to content

Commit 1b76ea7

Browse files
committed
Also retry on IncompleteRead
1 parent afc1822 commit 1b76ea7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/module_utils/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import json
1010
import os
1111

12+
from http.client import IncompleteRead
1213
from time import sleep
1314

1415
from ansible.module_utils.basic import env_fallback
@@ -168,7 +169,7 @@ def _open_url(self, path, method, data=None, fatal=True):
168169
return json.loads(result)
169170
return None
170171

171-
except ConnectionError as e:
172+
except (ConnectionError, IncompleteRead) as e:
172173
if attempt < 5:
173174
sleep(attempt)
174175
continue

0 commit comments

Comments
 (0)