mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
moved exceptions from product name too
This commit is contained in:
parent
f41a830f43
commit
b0abbf36fb
3 changed files with 18 additions and 16 deletions
|
|
@ -17,6 +17,8 @@ from .exceptions import (
|
|||
CreatorsSaveFailed,
|
||||
CreatorsRemoveFailed,
|
||||
CreatorsOperationFailed,
|
||||
TaskNotSetError,
|
||||
TemplateFillError,
|
||||
)
|
||||
from .structures import CreatedInstance
|
||||
from .utils import (
|
||||
|
|
@ -25,7 +27,6 @@ from .utils import (
|
|||
)
|
||||
|
||||
from .product_name import (
|
||||
TaskNotSetError,
|
||||
get_product_name,
|
||||
get_product_name_template,
|
||||
)
|
||||
|
|
@ -74,13 +75,14 @@ __all__ = (
|
|||
"CreatorsSaveFailed",
|
||||
"CreatorsRemoveFailed",
|
||||
"CreatorsOperationFailed",
|
||||
"TaskNotSetError",
|
||||
"TemplateFillError",
|
||||
|
||||
"CreatedInstance",
|
||||
|
||||
"get_last_versions_for_instances",
|
||||
"get_next_versions_for_instances",
|
||||
|
||||
"TaskNotSetError",
|
||||
"get_product_name",
|
||||
"get_product_name_template",
|
||||
|
||||
|
|
|
|||
|
|
@ -112,3 +112,16 @@ class CreatorsCreateFailed(CreatorsOperationFailed):
|
|||
msg = "Failed to create instances"
|
||||
super().__init__(msg, failed_info)
|
||||
|
||||
|
||||
class TaskNotSetError(KeyError):
|
||||
def __init__(self, msg=None):
|
||||
if not msg:
|
||||
msg = "Creator's product name template requires task name."
|
||||
super().__init__(msg)
|
||||
|
||||
|
||||
class TemplateFillError(Exception):
|
||||
def __init__(self, msg=None):
|
||||
if not msg:
|
||||
msg = "Creator's product name template is missing key value."
|
||||
super().__init__(msg)
|
||||
|
|
|
|||
|
|
@ -4,20 +4,7 @@ from ayon_core.settings import get_project_settings
|
|||
from ayon_core.lib import filter_profiles, prepare_template_data
|
||||
|
||||
from .constants import DEFAULT_PRODUCT_TEMPLATE
|
||||
|
||||
|
||||
class TaskNotSetError(KeyError):
|
||||
def __init__(self, msg=None):
|
||||
if not msg:
|
||||
msg = "Creator's product name template requires task name."
|
||||
super(TaskNotSetError, self).__init__(msg)
|
||||
|
||||
|
||||
class TemplateFillError(Exception):
|
||||
def __init__(self, msg=None):
|
||||
if not msg:
|
||||
msg = "Creator's product name template is missing key value."
|
||||
super(TemplateFillError, self).__init__(msg)
|
||||
from .exceptions import TaskNotSetError, TemplateFillError
|
||||
|
||||
|
||||
def get_product_name_template(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue