mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Refactor remaining usage of get_openpype_path_from_db -> get_openpype_path_from_settings
This commit is contained in:
parent
04613be3a1
commit
86c6e51263
3 changed files with 7 additions and 5 deletions
|
|
@ -23,7 +23,8 @@ from .user_settings import (
|
|||
OpenPypeSettingsRegistry
|
||||
)
|
||||
from .tools import (
|
||||
get_openpype_path_from_db,
|
||||
get_openpype_global_settings,
|
||||
get_openpype_path_from_settings,
|
||||
get_expected_studio_version_str
|
||||
)
|
||||
|
||||
|
|
@ -1263,7 +1264,8 @@ class BootstrapRepos:
|
|||
openpype_path = None
|
||||
# try to get OpenPype path from mongo.
|
||||
if location.startswith("mongodb"):
|
||||
openpype_path = get_openpype_path_from_db(location)
|
||||
global_settings = get_openpype_global_settings(location)
|
||||
openpype_path = get_openpype_path_from_settings(global_settings)
|
||||
if not openpype_path:
|
||||
self._print("cannot find OPENPYPE_PATH in settings.")
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ def get_openpype_global_settings(url: str) -> dict:
|
|||
return global_settings.get("data") or {}
|
||||
|
||||
|
||||
def get_openpype_path_from_db(settings: dict) -> Union[str, None]:
|
||||
def get_openpype_path_from_settings(settings: dict) -> Union[str, None]:
|
||||
"""Get OpenPype path from global settings.
|
||||
|
||||
Args:
|
||||
|
|
|
|||
4
start.py
4
start.py
|
|
@ -195,7 +195,7 @@ import igniter # noqa: E402
|
|||
from igniter import BootstrapRepos # noqa: E402
|
||||
from igniter.tools import (
|
||||
get_openpype_global_settings,
|
||||
get_openpype_path_from_db,
|
||||
get_openpype_path_from_settings,
|
||||
validate_mongo_connection,
|
||||
OpenPypeVersionNotFound
|
||||
) # noqa
|
||||
|
|
@ -929,7 +929,7 @@ def boot():
|
|||
|
||||
# Get openpype path from database and set it to environment so openpype can
|
||||
# find its versions there and bootstrap them.
|
||||
openpype_path = get_openpype_path_from_db(global_settings)
|
||||
openpype_path = get_openpype_path_from_settings(global_settings)
|
||||
|
||||
if getattr(sys, 'frozen', False):
|
||||
local_version = bootstrap.get_version(Path(OPENPYPE_ROOT))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue