mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
♻️ convert asserts
This commit is contained in:
parent
97834e32ba
commit
0de1b2f685
1 changed files with 8 additions and 10 deletions
|
|
@ -1,10 +1,8 @@
|
|||
import pyblish.api
|
||||
from maya import cmds
|
||||
|
||||
import pyblish.api
|
||||
from openpype.pipeline.publish import (
|
||||
RepairAction,
|
||||
ValidateContentsOrder,
|
||||
)
|
||||
PublishValidationError, RepairAction, ValidateContentsOrder)
|
||||
|
||||
|
||||
class ValidateRenderImageRule(pyblish.api.InstancePlugin):
|
||||
|
|
@ -27,12 +25,12 @@ class ValidateRenderImageRule(pyblish.api.InstancePlugin):
|
|||
required_images_rule = self.get_default_render_image_folder(instance)
|
||||
current_images_rule = cmds.workspace(fileRuleEntry="images")
|
||||
|
||||
assert current_images_rule == required_images_rule, (
|
||||
"Invalid workspace `images` file rule value: '{}'. "
|
||||
"Must be set to: '{}'".format(
|
||||
current_images_rule, required_images_rule
|
||||
)
|
||||
)
|
||||
if current_images_rule != required_images_rule:
|
||||
raise PublishValidationError(
|
||||
(
|
||||
"Invalid workspace `images` file rule value: '{}'. "
|
||||
"Must be set to: '{}'"
|
||||
).format(current_images_rule, required_images_rule))
|
||||
|
||||
@classmethod
|
||||
def repair(cls, instance):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue