mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-11-18 08:11:33 +00:00
Changed dependency-related exception to be compatible with Python versions < 3.6
This commit is contained in:
1 parent
1019c6ae00
commit
59ddd34d0e
1 file changed
+3
-3
+3
-3
@@ -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