def checkenv(self):
try:
import requests.packages.urllib3
except ImportError:
raise Exception('requests package not installed. Run pip install -r requirements.txt and try again.')
# Disable warnings about SSL connections
try:
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
except ImportError:
pass
try:
from requests.packages.urllib3.exceptions import InsecurePlatformWarning
requests.packages.urllib3.disable_warnings(InsecurePlatformWarning)
except ImportError:
pass
评论列表
文章目录