def localhost_supports_ipv6():

    return netifaces.AF_INET6 in netifaces.gateways()['default']
Determine whether the local host supports IPv6
dataset/ETHPy150Open openstack-infra/shade/shade/_utils.py/localhost_supports_ipv6