def __init__(self):
"""Initialize connect find os set ssl context, get IP address
:param None:
:returns: None
:todo: Add ifconfig command to try to get ip address
"""
try:
if self.os.name == 'nt':
ssl.create_default_context()
elif self.os.name == 'posix':
ssl._create_default_https_context = ssl._create_unverified_context
else:
ssl._create_default_https_context = ssl._create_unverified_context
except Exception,e:
pass
try:
#print socket.gethostname()
thisIP = "IP Address: " + socket.gethostbyname(socket.gethostname())
#Globals.strPrint (self.thisGlobals, thisIP)
except Exception,e:
#Globals.strPrint (self.thisGlobals, "No IP Found...")
pass
评论列表
文章目录