def set_tag_value(klass, obj, key, value, allowEmpty):
    if key in klass.__dict__:
        # check if we're allowed to set empty values
        if allowEmpty or not value is None:
            setattr(obj, key, value)
            logger.info('Set: %r to: %r' % (key, value))
        else:
            logger.info('%r ignored because it was empty' % key)
    else:
        # ToDo: Do we want to handle unknown tag values..?
        logger.error('Unable to set %r (unknown attribute)' % key)
dataset/ETHPy150Open fluidinfo/flimp/flimp/utils.py/set_tag_value/original