http protocol: Make optional (depending if requests is installed)
1 files changed, 6 insertions(+), 1 deletions(-) M protocol/http.py
M protocol/http.py => protocol/http.py +6 -1
@@ 1,4 1,9 @@ -import requests +try: + import requests +except ImportError: + class requests(): + def get(url, timeout): + raise ImportError("ImportError: Please install requests library to make HTTP/s requests.") class HttpProtocol(): def get(url): try: