From 59ddd34d0edce556289bb9bdf8f1cabe1e41014b Mon Sep 17 00:00:00 2001 From: Alexander Cecile <35971201+AlexanderCecile@users.noreply.github.com> Date: Fri, 28 Aug 2020 01:51:14 -0400 Subject: [PATCH] Changed dependency-related exception to be compatible with Python versions < 3.6 --- updateHostsFile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/updateHostsFile.py b/updateHostsFile.py index 2c50b4c37..6a2ec9d87 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -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