[3.4] Fix issues with loading config.json when it doesn't exist (#5416) (#5484)

* catch and handle FileNotFoundError when using --no-instance when config.json does not already exist

* move load_existing_config to data_manager.py

* use load_existing_config in create_temp_config

* Fix import in redbot-launcher

(cherry picked from commit cef55459c6)

Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Red-GitHubBot
2021-12-25 03:04:41 +01:00
committed by GitHub
parent 5dd0c3b579
commit ee513731be
3 changed files with 19 additions and 14 deletions

View File

@@ -16,13 +16,13 @@ import pkg_resources
from redbot import MIN_PYTHON_VERSION
from redbot.setup import (
basic_setup,
load_existing_config,
remove_instance,
remove_instance_interaction,
create_backup,
)
from redbot.core import __version__, version_info as red_version_info, VersionInfo
from redbot.core.cli import confirm
from redbot.core.data_manager import load_existing_config
if sys.platform == "linux":
import distro # pylint: disable=import-error