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

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

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


src/m/i/mixminion-HEAD/lib/mixminion/test.py   mixminion(Download)
        self.assertEquals(C._parseInt("99"), 99)
        # IP
        self.assertEquals(C._parseIP("192.168.0.1"), "192.168.0.1")
        # IP6
        self.assertEquals(C._parseIP6("::"), "::")