mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-07-01 02:36:52 +00:00
Changed dependency-related exception to be compatible with Python versions < 3.6
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user