change mod_repo to check return value from get_repo as get_repo no longer raise exception