@staticmethod
    def _convert_legacy_ipv6_netmask(netmask):
        try:
            prefix = int(netmask)
            return netaddr.IPNetwork('1::/%i' % prefix).netmask
        except ValueError:
            pass

        try:
            return netaddr.IPNetwork(netmask).netmask
        except netaddr.AddrFormatError:
            raise ValueError(_('IPv6 netmask "%s" must be a netmask '
                               'or integral prefix') % netmask)
Return a readable file-like object for the specified address.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/network.py/Network._convert_legacy_ipv6_netmask--crossover with--dataset/ETHPy150Open enthought/envisage/envisage/resource/http_resource_protocol.py/HTTPResourceProtocol.file