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.  Checks a config value as a valid hostname.
Raises ConfigError on failure.

        def _parseHost(host):
    """Validation function.  Checks a config value as a valid hostname.
       Raises ConfigError on failure."""
    host = host.strip()
    if not mixminion.Common.isPlausibleHostname(host):
        raise ConfigError("%r doesn't look like a valid hostname"%host)
    return host
        


src/m/i/mixminion-HEAD/lib/mixminion/test.py   mixminion(Download)
        self.assertEquals(C._parseIP6("::000:1.2.3.4"),"::000:1.2.3.4")
        # Host
        self.assertEquals(C._parseHost("foo.bar.baz "), "foo.bar.baz")
        # AddressSet
        pa = C._parseAddressSet_allow