(self, key, values=[], default=None)
return default
Reads a wildcard property from conf and returns its string value, if not set then default.
Reads a wildcard property from conf and returns its string value, if not set then default.
Reads a wildcard property from conf and returns its string value if not set then default .
def get_wildcard(self, key, values=[], default=None):
        """Reads a wildcard property from conf and returns its string value, if not set then default."""

        orig_key = key
        keys = [key]

        for wild in values:
            key = key.replace('*', wild, 1)
            keys.append(key)
        keys.reverse()

        for key in keys:
            try:
                return self.cf.get(self.main_section, key)
            except ConfigParser.NoOptionError:
                pass

        if default == None:
            raise Exception("Config value not set: " + orig_key)
        return default
def get_wildcard ( self , key , values = [ ] , default = None ) : orig_key = key keys = [ key ] for wild in values : key = key . replace ( '*' , wild , 1 ) keys . append ( key ) keys . reverse ( ) for key in keys : try : return self . cf . get ( self . main_section , key ) except ConfigParser . NoOptionError : pass if default == None : raise Exception ( "Config value not set: " + orig_key ) return default