From 30b81f6ecef5e78c70e2700a9b2837fa8f081095 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 12 Nov 2023 16:49:28 +0300 Subject: [PATCH] Fix(Py3): Some socket errors are reported as `OSError` --- Robots/bkmk_rurllib_py3.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Robots/bkmk_rurllib_py3.py b/Robots/bkmk_rurllib_py3.py index aca07cd..2b73347 100644 --- a/Robots/bkmk_rurllib_py3.py +++ b/Robots/bkmk_rurllib_py3.py @@ -115,6 +115,11 @@ class robot_urllib_py3(robot_base): except RedirectException as e: return None, e.errcode, e.newurl, None, None + except OSError as e: + error = str(e) + self.log(' Error: %s' % error) + return error, None, None, None, None + except IOError as e: if (e[0] == "http error") and (e[1] == -1): error = None -- 2.39.5