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 __HOLE__:
                # 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
dataset/ETHPy150Open coreemu/core/daemon/core/conf.py/ConfigurableManager.configure_values_keyvalues