mirror of https://github.com/apache/cloudstack.git
marvin: set ssl cert verification only if ssl module supports it
ssl._create_unverified_context is not available for all Python 2.x environment, the fix would check if the attribute is available before trying to set it Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
7843a092f5
commit
1f87057248
|
|
@ -19,7 +19,8 @@ from pyVmomi import vim, vmodl
|
|||
from pyVim import connect
|
||||
import atexit
|
||||
import ssl
|
||||
ssl._create_default_https_context = ssl._create_unverified_context
|
||||
if hasattr(ssl, '_create_unverified_context'):
|
||||
ssl._create_default_https_context = ssl._create_unverified_context
|
||||
|
||||
|
||||
class Vcenter():
|
||||
|
|
|
|||
Loading…
Reference in New Issue