Changed dependency-related exception to be compatible with Python versions < 3.6
authorAlexander Cecile <redacted>
Fri, 28 Aug 2020 05:51:14 +0000 (01:51 -0400)
committerAlexander Cecile <redacted>
Fri, 28 Aug 2020 05:51:14 +0000 (01:51 -0400)
updateHostsFile.py

index 2c50b4c370742cb53c131607d0d096672b58e24b..6a2ec9d878b84b5de3176d0b9a4757cb08145181 100644 (file)
@@ -30,9 +30,9 @@ if not PY3:
 
 try:
     import requests
-except ModuleNotFoundError:  # noqa: F821
-    raise ModuleNotFoundError("This project's dependencies have changed. The Requests library ("  # noqa: F821
-                              "https://requests.readthedocs.io/en/master/) is now required.")
+except ImportError:
+    raise ImportError("This project's dependencies have changed. The Requests library ("
+                      "https://requests.readthedocs.io/en/master/) is now required.")
 
 
 # Syntactic sugar for "sudo" command in UNIX / Linux
git clone https://git.99rst.org/PROJECT