def update_config(original, update, override=True):
    """
    Recursively update a dict.
    Subdict's won't be overwritten but also updated.
    """
    for key, value in update.items():
        if key not in original or (not isinstance(value, dict) and override):
            original[key] = value
        else:
            update_config(original[key], value)
    return original