在Python 3.4中,如何停止InsecureRequestWarning?

时间:2018-03-21 02:33:32

标签: python-3.x ssl-certificate urllib3

我在日志文件中看到此消息:

  

/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py:843:   InsecureRequestWarning:正在进行未验证的HTTPS请求。添加   强烈建议进行证书验证。看到:   https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

但看看我的代码;我正在添加指示的呼叫以停止这些警告:

# https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
import urllib3
urllib3.disable_warnings()
...

那有什么不对?

0 个答案:

没有答案