Suppress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6

前端 未结 9 1057
南方客
南方客 2020-11-27 09:06

I am writing scripts in Python2.6 with use of pyVmomi and while using one of the connection methods:

service_instance = connect.SmartConnect(host=args.ip,
           


        
9条回答
  •  萌比男神i
    2020-11-27 09:50

    This is the answer in 2017. urllib3 not a part of requests anymore

    import urllib3
    urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
    

提交回复
热议问题