Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)
Validation function.  Converts a config value to an IP address.
Raises ConfigError on failure.

        def _parseIP6(ip6):
    """Validation function.  Converts a config value to an IP address.
       Raises ConfigError on failure."""
    try:
        return mixminion.NetUtils.normalizeIP6(ip6)
    except ValueError, e:
        raise ConfigError(str(e))
        


src/m/i/mixminion-HEAD/lib/mixminion/test.py   mixminion(Download)
        self.assertEquals(C._parseIP("192.168.0.1"), "192.168.0.1")
        # IP6
        self.assertEquals(C._parseIP6("::"), "::")
        self.assertEquals(C._parseIP6("A::"), "A::")
        self.assertEquals(C._parseIP6("::A"), "::A")
        self.assertEquals(C._parseIP6("FE0F::A"), "FE0F::A")
        self.assertEquals(C._parseIP6("1:2:3:4:5:6:7:8"), "1:2:3:4:5:6:7:8")