def update_config(config, new_config, scope, force_local=False):
    """Updates a config dict with new values - either global if scope is None
    or config['journals'][scope] is just a string pointing to a journal file,
    or within the scope"""
    if scope and type(config['journals'][scope]) is dict:
        config['journals'][scope].update(new_config)
    elif scope and force_local:
        config['journals'][scope] = {'journal': config['journals'][scope]}
        config['journals'][scope].update(new_config)
    else:
        config.update(new_config)
