From 38f9ac83edd748caa0d262ddaa6af5df9139bda9 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 14 Nov 2023 01:21:45 +0300 Subject: [PATCH] Fix(Py3): Catch `http.client.IncompleteRead` --- Robots/bkmk_rurllib_py3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Robots/bkmk_rurllib_py3.py b/Robots/bkmk_rurllib_py3.py index 1da8ec8..9493a58 100644 --- a/Robots/bkmk_rurllib_py3.py +++ b/Robots/bkmk_rurllib_py3.py @@ -11,6 +11,7 @@ __license__ = "GNU GPL" __all__ = ['robot_urllib_py3'] +import http.client import socket import sys import urllib.request @@ -136,7 +137,7 @@ class robot_urllib_py3(robot_base): except RedirectException as e: return None, e.errcode, e.newurl, None, None - except OSError as e: + except (OSError, http.client.IncompleteRead) as e: error = str(e) self.log(' Error: %s' % error) return error, None, None, None, None -- 2.39.5