]> git.phdru.name Git - bookmarks_db.git/commitdiff
Fix(Py3): Some socket errors are reported as `OSError`
authorOleg Broytman <phd@phdru.name>
Sun, 12 Nov 2023 13:49:28 +0000 (16:49 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 12 Nov 2023 19:21:09 +0000 (22:21 +0300)
Robots/bkmk_rurllib_py3.py

index aca07cd86a09d21845597a3d84f76f10c98a2a48..2b73347568813505a270d9308e1595172aa98819 100644 (file)
@@ -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