daemon/core/conf.py
def configure_values_keyvalues(self, msg, values, target, keys):
        ''' Helper that can be used for configure_values for parsing in
            'key=value' strings from a values field. The key name must be
            in the keys list, and target.key=value is set.
        '''
        if values is None:
            return None
        kvs = values.split('|')
        for kv in kvs:
            try:
                # key=value
                (key, value) = kv.split('=', 1)
                if value is not None and not value.strip():
                    value = None
            except ValueError:
                # value only
                key = keys[kvs.index(kv)]
                value = kv
            if key not in keys:
                raise ValueError, "invalid key: %s" % key
            if value is not None:
                setattr(target, key, value)
        return None
 Helper that can be used for configure_values for parsing in
            'key=value' strings from a values field. The key name must be
            in the keys list, and target.key=value is set.
        
Helper that can be used for configure_values for parsing in
'key=value' strings from a values field. The key name must be
in the keys list, and target.key=value is set.
Helper that can be used for configure_values for parsing in ' key = value ' strings from a values field . The key name must be in the keys list and target . key = value is set .
def configure_values_keyvalues(self, msg, values, target, keys):
        if values is None:
            return None
        kvs = values.split('|')
        for kv in kvs:
            try:
                (key, value) = kv.split('=', 1)
                if value is not None and not value.strip():
                    value = None
            except ValueError:
                key = keys[kvs.index(kv)]
                value = kv
            if key not in keys:
                raise ValueError, "invalid key: %s" % key
            if value is not None:
                setattr(target, key, value)
        return None
def configure_values_keyvalues ( self , msg , values , target , keys ) : if values is None : return None kvs = values . split ( '|' ) for kv in kvs : try : ( key , value ) = kv . split ( '=' , 1 ) if value is not None and not value . strip ( ) : value = None except ValueError : key = keys [ kvs . index ( kv ) ] value = kv if key not in keys : raise ValueError , "invalid key: %s" % key if value is not None : setattr ( target , key , value ) return None
Helper that can be used for configure_values for parsing in
'key=value' strings from a values field.
Helper that can be used for configure_values for parsing in ' key = value ' strings from a values field .
''' Helper that can be used for configure_values for parsing in
            'key=value' strings from a values field. The key name must be
            in the keys list, and target.key=value is set.
        ''' # key=value # value only
self
msg
values
target
keys