src/eric7/WebBrowser/SafeBrowsing/SafeBrowsingUrl.py

branch
eric7
changeset 9462
e65379fdbd97
parent 9413
80c06d472826
child 9473
3f23dbf37dbe
--- a/src/eric7/WebBrowser/SafeBrowsing/SafeBrowsingUrl.py	Wed Nov 02 10:12:25 2022 +0100
+++ b/src/eric7/WebBrowser/SafeBrowsing/SafeBrowsingUrl.py	Wed Nov 02 12:07:01 2022 +0100
@@ -110,10 +110,10 @@
         host = host.strip(".")
         host = re.sub(r"\.+", ".", host).lower()
         if host.isdigit():
-            with contextlib.suppress(Exception):
+            with contextlib.suppress(OSError):
                 host = socket.inet_ntoa(struct.pack("!I", int(host)))
         if host.startswith("0x") and "." not in host:
-            with contextlib.suppress(Exception):
+            with contextlib.suppress(OSError):
                 host = socket.inet_ntoa(struct.pack("!I", int(host, 16)))
         quotedPath = quote(path)
         quotedHost = quote(host)

eric ide

mercurial