From 2d970cc3772e4f7d9074436c99b40c48dc6eee9e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 22 Jun 2020 17:57:57 +0100 Subject: [PATCH] Function to check if a domain is resolvable --- utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 881f75e40..fbe06ee95 100644 --- a/utils.py +++ b/utils.py @@ -12,7 +12,6 @@ import shutil import datetime import json from urllib.request import urlopen -from urllib.request import URLError from pprint import pprint from calendar import monthrange @@ -1078,5 +1077,5 @@ def siteIsActive(url: str) -> bool: try: urlopen(url, timeout=10) return True - except URLError as err: + except BaseException: return False