From: Oleg Broytman Date: Mon, 13 Nov 2023 22:21:45 +0000 (+0300) Subject: Fix(Py3): Catch `http.client.IncompleteRead` X-Git-Tag: 5.0.0~36 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=38f9ac83edd748caa0d262ddaa6af5df9139bda9;p=bookmarks_db.git Fix(Py3): Catch `http.client.IncompleteRead` --- 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