From f2a6a4d157e25ad92d1fd62922a03d84e025ec89 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Mon, 5 Feb 2024 17:55:11 +0100 Subject: [PATCH] remove 'AYON_SERVER_ENABLED' checks in 'ayon_core.lib' --- client/ayon_core/lib/__init__.py | 10 +- client/ayon_core/lib/applications.py | 13 +- client/ayon_core/lib/execute.py | 75 ++---------- client/ayon_core/lib/local_settings.py | 111 +++--------------- client/ayon_core/lib/openpype_version.py | 67 +---------- client/ayon_core/lib/pype_info.py | 26 +--- client/ayon_core/lib/vendor_bin_utils.py | 94 ++++----------- .../modules/clockify/clockify_api.py | 4 +- client/ayon_core/modules/royalrender/api.py | 4 +- .../tools/launcher/models/actions.py | 4 +- .../ayon_core/tools/tray/pype_info_widget.py | 1 - 11 files changed, 67 insertions(+), 342 deletions(-) diff --git a/client/ayon_core/lib/__init__.py b/client/ayon_core/lib/__init__.py index be010c5a8c..8a2082394c 100644 --- a/client/ayon_core/lib/__init__.py +++ b/client/ayon_core/lib/__init__.py @@ -24,7 +24,6 @@ from .events import ( from .vendor_bin_utils import ( ToolNotFoundError, find_executable, - get_vendor_bin_path, get_oiio_tools_path, get_oiio_tool_args, get_ffmpeg_tool_path, @@ -63,7 +62,6 @@ from .execute import ( run_detached_process, run_ayon_launcher_process, run_openpype_process, - clean_envs_for_openpype_process, path_to_subprocess_arg, CREATE_NO_WINDOW ) @@ -117,12 +115,12 @@ from .transcoding import ( from .local_settings import ( IniSettingRegistry, JSONSettingRegistry, + AYONSecureRegistry, + AYONSettingsRegistry, OpenPypeSecureRegistry, OpenPypeSettingsRegistry, get_local_site_id, - change_openpype_mongo_url, get_openpype_username, - is_admin_password_required ) from .applications import ( @@ -186,7 +184,6 @@ __all__ = [ "run_detached_process", "run_ayon_launcher_process", "run_openpype_process", - "clean_envs_for_openpype_process", "path_to_subprocess_arg", "CREATE_NO_WINDOW", @@ -195,7 +192,6 @@ __all__ = [ "ToolNotFoundError", "find_executable", - "get_vendor_bin_path", "get_oiio_tools_path", "get_oiio_tool_args", "get_ffmpeg_tool_path", @@ -240,9 +236,7 @@ __all__ = [ "OpenPypeSecureRegistry", "OpenPypeSettingsRegistry", "get_local_site_id", - "change_openpype_mongo_url", "get_openpype_username", - "is_admin_password_required", "ApplicationLaunchFailed", "ApplictionExecutableNotFound", diff --git a/client/ayon_core/lib/applications.py b/client/ayon_core/lib/applications.py index 11d8a77ee1..959e118641 100644 --- a/client/ayon_core/lib/applications.py +++ b/client/ayon_core/lib/applications.py @@ -11,7 +11,7 @@ from abc import ABCMeta, abstractmethod import six -from ayon_core import AYON_SERVER_ENABLED, AYON_CORE_ROOT +from ayon_core import AYON_CORE_ROOT from ayon_core.client import get_asset_name_identifier from ayon_core.settings import ( get_system_settings, @@ -2034,20 +2034,13 @@ def get_non_python_host_kwargs(kwargs, allow_console=True): if platform.system().lower() != "windows": return kwargs - if AYON_SERVER_ENABLED: - executable_path = os.environ.get("AYON_EXECUTABLE") - else: - executable_path = os.environ.get("OPENPYPE_EXECUTABLE") + executable_path = os.environ.get("AYON_EXECUTABLE") executable_filename = "" if executable_path: executable_filename = os.path.basename(executable_path) - if AYON_SERVER_ENABLED: - is_gui_executable = "ayon_console" not in executable_filename - else: - is_gui_executable = "openpype_gui" in executable_filename - + is_gui_executable = "ayon_console" not in executable_filename if is_gui_executable: kwargs.update({ "creationflags": subprocess.CREATE_NO_WINDOW, diff --git a/client/ayon_core/lib/execute.py b/client/ayon_core/lib/execute.py index eb86cbd57d..2343b5a753 100644 --- a/client/ayon_core/lib/execute.py +++ b/client/ayon_core/lib/execute.py @@ -5,8 +5,6 @@ import platform import json import tempfile -from ayon_core import AYON_SERVER_ENABLED - from .log import Logger from .vendor_bin_utils import find_executable @@ -41,7 +39,6 @@ def execute(args, int: return code of process """ - log_levels = ['DEBUG:', 'INFO:', 'ERROR:', 'WARNING:', 'CRITICAL:'] log = Logger.get_logger('execute') @@ -101,7 +98,6 @@ def run_subprocess(*args, **kwargs): RuntimeError: Exception is raised if process finished with nonzero return code. """ - # Modify creation flags on windows to hide console window if in UI mode if ( platform.system().lower() == "windows" @@ -176,7 +172,6 @@ def clean_envs_for_ayon_process(env=None): Returns: dict[str, str]: Environment variables for ayon process. """ - if env is None: env = os.environ @@ -194,19 +189,7 @@ def clean_envs_for_openpype_process(env=None): Main reason to implement this function is to pop PYTHONPATH which may be affected by in-host environments. """ - - if AYON_SERVER_ENABLED: - return clean_envs_for_ayon_process(env=env) - - if env is None: - env = os.environ - - # Exclude some environment variables from a copy of the environment - env = env.copy() - for key in ["PYTHONPATH", "PYTHONHOME"]: - env.pop(key, None) - - return env + return clean_envs_for_ayon_process(env=env) def run_ayon_launcher_process(*args, **kwargs): @@ -216,7 +199,7 @@ def run_ayon_launcher_process(*args, **kwargs): before passed arguments and define environments if are not passed. Values from 'os.environ' are used for environments if are not passed. - They are cleaned using 'clean_envs_for_openpype_process' function. + They are cleaned using 'clean_envs_for_ayon_process' function. Example: ``` @@ -230,14 +213,13 @@ def run_ayon_launcher_process(*args, **kwargs): Returns: str: Full output of subprocess concatenated stdout and stderr. """ - args = get_ayon_launcher_args(*args) env = kwargs.pop("env", None) # Keep env untouched if are passed and not empty if not env: # Skip envs that can affect OpenPype process # - fill more if you find more - env = clean_envs_for_openpype_process(os.environ) + env = clean_envs_for_ayon_process(os.environ) # Only keep OpenPype version if we are running from build. if not is_running_from_build(): @@ -262,31 +244,12 @@ def run_openpype_process(*args, **kwargs): *args (tuple): OpenPype cli arguments. **kwargs (dict): Keyword arguments for subprocess.Popen. """ - - if AYON_SERVER_ENABLED: - return run_ayon_launcher_process(*args, **kwargs) - - args = get_openpype_execute_args(*args) - env = kwargs.pop("env", None) - # Keep env untouched if are passed and not empty - if not env: - # Skip envs that can affect OpenPype process - # - fill more if you find more - env = clean_envs_for_openpype_process(os.environ) - - # Only keep OpenPype version if we are running from build. - if not is_running_from_build(): - env.pop("OPENPYPE_VERSION", None) - - return run_subprocess(args, env=env, **kwargs) + return run_ayon_launcher_process(*args, **kwargs) def run_detached_process(args, **kwargs): """Execute process with passed arguments as separated process. - Values from 'os.environ' are used for environments if are not passed. - They are cleaned using 'clean_envs_for_openpype_process' function. - Example: >>> run_detached_process("run", "./path_to.py") @@ -299,7 +262,6 @@ def run_detached_process(args, **kwargs): subprocess.Popen: Pointer to launched process but it is possible that launched process is already killed (on linux). """ - env = kwargs.pop("env", None) # Keep env untouched if are passed and not empty if not env: @@ -381,7 +343,6 @@ def get_ayon_launcher_args(*args): Returns: list[str]: List of arguments to run ayon-launcher process. """ - executable = os.environ["AYON_EXECUTABLE"] launch_args = [executable] @@ -411,22 +372,7 @@ def get_openpype_execute_args(*args): It is possible to pass any arguments that will be added after pype executables. """ - - if AYON_SERVER_ENABLED: - return get_ayon_launcher_args(*args) - - executable = os.environ["OPENPYPE_EXECUTABLE"] - launch_args = [executable] - - executable_filename = os.path.basename(executable) - if "python" in executable_filename.lower(): - filepath = os.path.join(os.environ["OPENPYPE_ROOT"], "start.py") - launch_args.append(filepath) - - if args: - launch_args.extend(args) - - return launch_args + return get_ayon_launcher_args(*args) def get_linux_launcher_args(*args): @@ -449,19 +395,12 @@ def get_linux_launcher_args(*args): list: Executables with possible positional argument to script when called from code. """ - filename = "app_launcher" - if AYON_SERVER_ENABLED: - executable = os.environ["AYON_EXECUTABLE"] - else: - executable = os.environ["OPENPYPE_EXECUTABLE"] + executable = os.environ["AYON_EXECUTABLE"] executable_filename = os.path.basename(executable) if "python" in executable_filename.lower(): - if AYON_SERVER_ENABLED: - root = os.environ["AYON_ROOT"] - else: - root = os.environ["OPENPYPE_ROOT"] + root = os.environ["AYON_ROOT"] script_path = os.path.join(root, "{}.py".format(filename)) launch_args = [executable, script_path] else: diff --git a/client/ayon_core/lib/local_settings.py b/client/ayon_core/lib/local_settings.py index c6d92c5f69..c5b7e7f8a8 100644 --- a/client/ayon_core/lib/local_settings.py +++ b/client/ayon_core/lib/local_settings.py @@ -2,12 +2,10 @@ """Package to deal with saving and retrieving user specific settings.""" import os import json -import getpass import platform from datetime import datetime from abc import ABCMeta, abstractmethod -# TODO Use pype igniter logic instead of using duplicated code # disable lru cache in Python 2 try: from functools import lru_cache @@ -29,19 +27,13 @@ except ImportError: import six import appdirs -from ayon_core import AYON_SERVER_ENABLED -from ayon_core.settings import ( - get_local_settings, - get_system_settings -) - from ayon_core.client.mongo import validate_mongo_connection from ayon_core.client import get_ayon_server_api_connection _PLACEHOLDER = object() -class OpenPypeSecureRegistry: +class AYONSecureRegistry: """Store information using keyring. Registry should be used for private data that should be available only for @@ -255,8 +247,7 @@ class IniSettingRegistry(ASettingRegistry): now = datetime.now().strftime("%d/%m/%Y %H:%M:%S") print("# {}".format(now), cfg) - def set_item_section( - self, section, name, value): + def set_item_section(self, section, name, value): # type: (str, str, str) -> None """Set item to specific section of ini registry. @@ -401,10 +392,7 @@ class JSONSettingRegistry(ASettingRegistry): self._registry_file = os.path.join(path, "{}.json".format(name)) now = datetime.now().strftime("%d/%m/%Y %H:%M:%S") header = { - "__metadata__": { - "openpype-version": os.getenv("OPENPYPE_VERSION", "N/A"), - "generated": now - }, + "__metadata__": {"generated": now}, "registry": {} } @@ -485,28 +473,22 @@ class JSONSettingRegistry(ASettingRegistry): json.dump(data, cfg, indent=4) -class OpenPypeSettingsRegistry(JSONSettingRegistry): - """Class handling OpenPype general settings registry. +class AYONSettingsRegistry(JSONSettingRegistry): + """Class handling AYON general settings registry. Attributes: vendor (str): Name used for path construction. product (str): Additional name used for path construction. + Args: + name (Optional[str]): Name of the registry. """ def __init__(self, name=None): - if AYON_SERVER_ENABLED: - vendor = "Ynput" - product = "AYON" - default_name = "AYON_settings" - else: - vendor = "pypeclub" - product = "openpype" - default_name = "openpype_settings" - self.vendor = vendor - self.product = product + self.vendor = "Ynput" + self.product = "AYON" if not name: - name = default_name + name = "AYON_settings" path = appdirs.user_data_dir(self.product, self.vendor) super(OpenPypeSettingsRegistry, self).__init__(name, path) @@ -543,7 +525,11 @@ def get_ayon_appdirs(*args): ) -def _get_ayon_local_site_id(): +def get_local_site_id(): + """Get local site identifier. + + Identifier is created if does not exists yet. + """ # used for background syncing site_id = os.environ.get("AYON_SITE_ID") if site_id: @@ -566,43 +552,6 @@ def _get_ayon_local_site_id(): return site_id -def get_local_site_id(): - """Get local site identifier. - - Identifier is created if does not exists yet. - """ - - if AYON_SERVER_ENABLED: - return _get_ayon_local_site_id() - - # override local id from environment - # used for background syncing - if os.environ.get("OPENPYPE_LOCAL_ID"): - return os.environ["OPENPYPE_LOCAL_ID"] - - registry = OpenPypeSettingsRegistry() - try: - return registry.get_item("localId") - except ValueError: - return _create_local_site_id() - - -def change_openpype_mongo_url(new_mongo_url): - """Change mongo url in pype registry. - - Change of OpenPype mongo URL require restart of running pype processes or - processes using pype. - """ - - validate_mongo_connection(new_mongo_url) - key = "openPypeMongo" - registry = OpenPypeSecureRegistry("mongodb") - existing_value = registry.get_item(key, None) - if existing_value is not None: - registry.delete_item(key) - registry.set_item(key, new_mongo_url) - - def get_openpype_username(): """OpenPype username used for templates and publishing. @@ -613,31 +562,9 @@ def get_openpype_username(): machine username. """ - if AYON_SERVER_ENABLED: - con = get_ayon_server_api_connection() - return con.get_user()["name"] - - username = os.environ.get("OPENPYPE_USERNAME") - if not username: - local_settings = get_local_settings() - username = ( - local_settings - .get("general", {}) - .get("username") - ) - if not username: - username = getpass.getuser() - return username + con = get_ayon_server_api_connection() + return con.get_user()["name"] -def is_admin_password_required(): - system_settings = get_system_settings() - password = system_settings["general"].get("admin_password") - if not password: - return False - - local_settings = get_local_settings() - is_admin = local_settings.get("general", {}).get("is_admin", False) - if is_admin: - return False - return True +OpenPypeSecureRegistry = AYONSecureRegistry +OpenPypeSettingsRegistry = AYONSettingsRegistry diff --git a/client/ayon_core/lib/openpype_version.py b/client/ayon_core/lib/openpype_version.py index e5163826f0..ae9db47f2e 100644 --- a/client/ayon_core/lib/openpype_version.py +++ b/client/ayon_core/lib/openpype_version.py @@ -13,9 +13,6 @@ import os import sys import ayon_core.version -from ayon_core import AYON_SERVER_ENABLED - -from .python_module_tools import import_filepath # ---------------------------------------- @@ -27,10 +24,7 @@ def get_openpype_version(): def get_ayon_launcher_version(): - version_filepath = os.path.join( - os.environ["AYON_ROOT"], - "version.py" - ) + version_filepath = os.path.join(os.environ["AYON_ROOT"], "version.py") if not os.path.exists(version_filepath): return None content = {} @@ -42,24 +36,7 @@ def get_ayon_launcher_version(): def get_build_version(): """OpenPype version of build.""" - if AYON_SERVER_ENABLED: - return get_ayon_launcher_version() - - # Return OpenPype version if is running from code - if not is_running_from_build(): - return get_openpype_version() - - # Import `version.py` from build directory - version_filepath = os.path.join( - os.environ["OPENPYPE_ROOT"], - "openpype", - "version.py" - ) - if not os.path.exists(version_filepath): - return None - - module = import_filepath(version_filepath, "openpype_build_version") - return getattr(module, "__version__", None) + return get_ayon_launcher_version() def is_running_from_build(): @@ -69,10 +46,7 @@ def is_running_from_build(): bool: True if running from build. """ - if AYON_SERVER_ENABLED: - executable_path = os.environ["AYON_EXECUTABLE"] - else: - executable_path = os.environ["OPENPYPE_EXECUTABLE"] + executable_path = os.environ["AYON_EXECUTABLE"] executable_filename = os.path.basename(executable_path) if "python" in executable_filename.lower(): return False @@ -80,9 +54,7 @@ def is_running_from_build(): def is_staging_enabled(): - if AYON_SERVER_ENABLED: - return os.getenv("AYON_USE_STAGING") == "1" - return os.environ.get("OPENPYPE_USE_STAGING") == "1" + return os.getenv("AYON_USE_STAGING") == "1" def is_running_staging(): @@ -112,37 +84,6 @@ def is_running_staging(): bool: Using staging version or not. """ - if AYON_SERVER_ENABLED: - return is_staging_enabled() - - if os.environ.get("OPENPYPE_IS_STAGING") == "1": - return True - - if not op_version_control_available(): - return False - - from ayon_core.settings import get_global_settings - - global_settings = get_global_settings() - production_version = global_settings["production_version"] - latest_version = None - if not production_version or production_version == "latest": - latest_version = get_latest_version(local=False, remote=True) - production_version = latest_version - - current_version = get_openpype_version() - if current_version == production_version: - return False - - staging_version = global_settings["staging_version"] - if not staging_version or staging_version == "latest": - if latest_version is None: - latest_version = get_latest_version(local=False, remote=True) - staging_version = latest_version - - if current_version == staging_version: - return True - return is_staging_enabled() diff --git a/client/ayon_core/lib/pype_info.py b/client/ayon_core/lib/pype_info.py index 3615c1e34a..03f9161f85 100644 --- a/client/ayon_core/lib/pype_info.py +++ b/client/ayon_core/lib/pype_info.py @@ -5,7 +5,6 @@ import platform import getpass import socket -from ayon_core import AYON_SERVER_ENABLED from ayon_core.settings.lib import get_local_settings from .execute import get_openpype_execute_args from .local_settings import get_local_site_id @@ -16,24 +15,6 @@ from .openpype_version import ( ) -def get_openpype_info(): - """Information about currently used Pype process.""" - executable_args = get_openpype_execute_args() - if is_running_from_build(): - version_type = "build" - else: - version_type = "code" - - return { - "build_verison": get_build_version(), - "version": get_openpype_version(), - "version_type": version_type, - "executable": executable_args[-1], - "pype_root": os.environ["OPENPYPE_REPOS_ROOT"], - "mongo_url": os.environ["OPENPYPE_MONGO"] - } - - def get_ayon_info(): executable_args = get_openpype_execute_args() if is_running_from_build(): @@ -72,12 +53,9 @@ def get_all_current_info(): output = { "workstation": get_workstation_info(), "env": os.environ.copy(), - "local_settings": get_local_settings() + "local_settings": get_local_settings(), + "ayon": get_ayon_info(), } - if AYON_SERVER_ENABLED: - output["ayon"] = get_ayon_info() - else: - output["openpype"] = get_openpype_info() return output diff --git a/client/ayon_core/lib/vendor_bin_utils.py b/client/ayon_core/lib/vendor_bin_utils.py index f8272d5d49..bac82134ac 100644 --- a/client/ayon_core/lib/vendor_bin_utils.py +++ b/client/ayon_core/lib/vendor_bin_utils.py @@ -3,8 +3,6 @@ import logging import platform import subprocess -from ayon_core import AYON_SERVER_ENABLED - log = logging.getLogger("Vendor utils") @@ -140,30 +138,6 @@ def find_executable(executable): return None -def get_vendor_bin_path(bin_app): - """Path to OpenPype vendorized binaries. - - Vendorized executables are expected in specific hierarchy inside build or - in code source. - - "{OPENPYPE_ROOT}/vendor/bin/{name of vendorized app}/{platform}" - - Args: - bin_app (str): Name of vendorized application. - - Returns: - str: Path to vendorized binaries folder. - """ - - return os.path.join( - os.environ["OPENPYPE_ROOT"], - "vendor", - "bin", - bin_app, - platform.system().lower() - ) - - def find_tool_in_custom_paths(paths, tool, validation_func=None): """Find a tool executable in custom paths. @@ -322,16 +296,15 @@ def get_oiio_tools_path(tool="oiiotool"): if CachedToolPaths.is_tool_cached(tool): return CachedToolPaths.get_executable_path(tool) - if AYON_SERVER_ENABLED: - args = _get_ayon_oiio_tool_args(tool) - if args: - if len(args) > 1: - raise ValueError( - "AYON oiio arguments consist of multiple arguments." - ) - tool_executable_path = args[0] - CachedToolPaths.cache_executable_path(tool, tool_executable_path) - return tool_executable_path + args = _get_ayon_oiio_tool_args(tool) + if args: + if len(args) > 1: + raise ValueError( + "AYON oiio arguments consist of multiple arguments." + ) + tool_executable_path = args[0] + CachedToolPaths.cache_executable_path(tool, tool_executable_path) + return tool_executable_path custom_paths_str = os.environ.get("OPENPYPE_OIIO_PATHS") or "" tool_executable_path = find_tool_in_custom_paths( @@ -340,14 +313,6 @@ def get_oiio_tools_path(tool="oiiotool"): _oiio_executable_validation ) - if not tool_executable_path: - oiio_dir = get_vendor_bin_path("oiio") - if platform.system().lower() == "linux": - oiio_dir = os.path.join(oiio_dir, "bin") - default_path = find_executable(os.path.join(oiio_dir, tool)) - if default_path and _oiio_executable_validation(default_path): - tool_executable_path = default_path - # Look to PATH for the tool if not tool_executable_path: from_path = find_executable(tool) @@ -371,10 +336,9 @@ def get_oiio_tool_args(tool_name, *extra_args): extra_args = list(extra_args) - if AYON_SERVER_ENABLED: - args = _get_ayon_oiio_tool_args(tool_name) - if args: - return args + extra_args + args = _get_ayon_oiio_tool_args(tool_name) + if args: + return args + extra_args path = get_oiio_tools_path(tool_name) if path: @@ -449,16 +413,15 @@ def get_ffmpeg_tool_path(tool="ffmpeg"): if CachedToolPaths.is_tool_cached(tool): return CachedToolPaths.get_executable_path(tool) - if AYON_SERVER_ENABLED: - args = _get_ayon_ffmpeg_tool_args(tool) - if args is not None: - if len(args) > 1: - raise ValueError( - "AYON ffmpeg arguments consist of multiple arguments." - ) - tool_executable_path = args[0] - CachedToolPaths.cache_executable_path(tool, tool_executable_path) - return tool_executable_path + args = _get_ayon_ffmpeg_tool_args(tool) + if args is not None: + if len(args) > 1: + raise ValueError( + "AYON ffmpeg arguments consist of multiple arguments." + ) + tool_executable_path = args[0] + CachedToolPaths.cache_executable_path(tool, tool_executable_path) + return tool_executable_path custom_paths_str = os.environ.get("OPENPYPE_FFMPEG_PATHS") or "" tool_executable_path = find_tool_in_custom_paths( @@ -467,14 +430,6 @@ def get_ffmpeg_tool_path(tool="ffmpeg"): _ffmpeg_executable_validation ) - if not tool_executable_path: - ffmpeg_dir = get_vendor_bin_path("ffmpeg") - if platform.system().lower() == "windows": - ffmpeg_dir = os.path.join(ffmpeg_dir, "bin") - tool_path = find_executable(os.path.join(ffmpeg_dir, tool)) - if tool_path and _ffmpeg_executable_validation(tool_path): - tool_executable_path = tool_path - # Look to PATH for the tool if not tool_executable_path: from_path = find_executable(tool) @@ -498,10 +453,9 @@ def get_ffmpeg_tool_args(tool_name, *extra_args): extra_args = list(extra_args) - if AYON_SERVER_ENABLED: - args = _get_ayon_ffmpeg_tool_args(tool_name) - if args: - return args + extra_args + args = _get_ayon_ffmpeg_tool_args(tool_name) + if args: + return args + extra_args executable_path = get_ffmpeg_tool_path(tool_name) if executable_path: diff --git a/client/ayon_core/modules/clockify/clockify_api.py b/client/ayon_core/modules/clockify/clockify_api.py index 24ac67465f..f8c9c537ee 100644 --- a/client/ayon_core/modules/clockify/clockify_api.py +++ b/client/ayon_core/modules/clockify/clockify_api.py @@ -9,7 +9,7 @@ from .constants import ( ADMIN_PERMISSION_NAMES, ) -from ayon_core.lib.local_settings import OpenPypeSecureRegistry +from ayon_core.lib.local_settings import AYONSecureRegistry from ayon_core.lib import Logger @@ -27,7 +27,7 @@ class ClockifyAPI: @property def secure_registry(self): if self._secure_registry is None: - self._secure_registry = OpenPypeSecureRegistry("clockify") + self._secure_registry = AYONSecureRegistry("clockify") return self._secure_registry @property diff --git a/client/ayon_core/modules/royalrender/api.py b/client/ayon_core/modules/royalrender/api.py index c46d1c0868..cd72014a42 100644 --- a/client/ayon_core/modules/royalrender/api.py +++ b/client/ayon_core/modules/royalrender/api.py @@ -3,7 +3,7 @@ import sys import os -from ayon_core.lib.local_settings import OpenPypeSettingsRegistry +from ayon_core.lib.local_settings import AYONSettingsRegistry from ayon_core.lib import Logger, run_subprocess from .rr_job import RRJob, SubmitFile, SubmitterParameter from ayon_core.lib.vendor_bin_utils import find_tool_in_custom_paths @@ -154,7 +154,7 @@ class Api: # Probably best way until we setup our own user management would be # to encrypt password and save it to json locally. Not bulletproof # but at least it is not stored in plaintext. - reg = OpenPypeSettingsRegistry() + reg = AYONSettingsRegistry("rr_settings") try: rr_user = reg.get_item("rr_username") rr_password = reg.get_item("rr_password") diff --git a/client/ayon_core/tools/launcher/models/actions.py b/client/ayon_core/tools/launcher/models/actions.py index 35f6eb5995..6d212d6ccb 100644 --- a/client/ayon_core/tools/launcher/models/actions.py +++ b/client/ayon_core/tools/launcher/models/actions.py @@ -1,7 +1,7 @@ import os from ayon_core import resources -from ayon_core.lib import Logger, OpenPypeSettingsRegistry +from ayon_core.lib import Logger, AYONSettingsRegistry from ayon_core.pipeline.actions import ( discover_launcher_actions, LauncherAction, @@ -276,7 +276,7 @@ class ActionsModel: self._actions = None self._action_items = {} - self._launcher_tool_reg = OpenPypeSettingsRegistry("launcher_tool") + self._launcher_tool_reg = AYONSettingsRegistry("launcher_tool") @property def log(self): diff --git a/client/ayon_core/tools/tray/pype_info_widget.py b/client/ayon_core/tools/tray/pype_info_widget.py index ffb8599e68..cee273da52 100644 --- a/client/ayon_core/tools/tray/pype_info_widget.py +++ b/client/ayon_core/tools/tray/pype_info_widget.py @@ -11,7 +11,6 @@ from ayon_core import resources from ayon_core.lib import get_openpype_execute_args from ayon_core.lib.pype_info import ( get_all_current_info, - get_openpype_info, get_workstation_info, extract_pype_info_to_file )