Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(2) | Call(1) | Derive(0) | Import(1)
def checkIPv6Support(): pos = Config.LOCAL_IP.find(":") if (pos != -1): if hasattr(socket, "has_ipv6"): Config.ipv6 = socket.has_ipv6 if Config.ipv6: Config.socket_type = socket.AF_INET6 if (str(Config.LOCAL_IP).find(":") != -1) and not str(Config.LOCAL_IP).startswith("["): Config.LOCAL_IP = "[" + Config.LOCAL_IP + "]" if (str(Config.TEST_HOST).find(":") != -1) and not str(Config.TEST_HOST).startswith("["): Config.TEST_HOST = "[" + Config.TEST_HOST + "]" else: Config.ipv6 = True Config.socket_type = socket.AF_INET6 else: Config.ipv6 = False Config.socket_type = socket.AF_INET
from TestResult import TestResult, getResultString import sys, os, getopt, traceback, socket, py_compile from NetworkEventHandler import getHostNameIP, getFQDN, checkIPv6Support def resToCol(res):
print "Failed to resolve LOCAL_HOSTNAME ('" + str(Config.LOCAL_HOSTNAME) + "') from Config.py\r\nPlease fix the hostname or specify the IP as LOCAL_IP in Config.py" sys.exit(1) checkIPv6Support() sc.run() return sc