jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/360742 )
Change subject: [bugfix] Solve httplib.IncompleteRead exception ......................................................................
[bugfix] Solve httplib.IncompleteRead exception
Bug: T168535 Change-Id: I5e7e09b54f523f898ae308dead610103fb320d35 --- M pywikibot/comms/eventstreams.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py index bd80ffe..2236481 100644 --- a/pywikibot/comms/eventstreams.py +++ b/pywikibot/comms/eventstreams.py @@ -19,6 +19,7 @@ import socket
from requests.packages.urllib3.exceptions import ProtocolError +from requests.packages.urllib3.response import httplib
try: from sseclient import SSEClient as EventSource @@ -207,7 +208,7 @@ self.source = EventSource(**self.sse_kwargs) try: event = next(self.source) - except (ProtocolError, socket.error) as e: + except (ProtocolError, socket.error, httplib.IncompleteRead) as e: warning('Connection error: {0}.\n' 'Try to re-establish connection.'.format(e)) del self.source