From bfbfdf7067703226c921916d2e4bbd1e0bd14854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A0=20Serra=20Arrizabalaga?= Date: Tue, 21 Feb 2023 23:33:28 +0100 Subject: [PATCH] Use dict indexing instead of .get to assert existence Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- openpype/pipeline/publish/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/pipeline/publish/lib.py b/openpype/pipeline/publish/lib.py index c563bc8207..5dce74156b 100644 --- a/openpype/pipeline/publish/lib.py +++ b/openpype/pipeline/publish/lib.py @@ -694,7 +694,7 @@ def get_publish_repre_path(instance, repre, only_published=False): # Expand the staging dir path in case it's been stored with the root # template syntax - anatomy = instance.context.data.get("anatomy") + anatomy = instance.context.data["anatomy"] staging_dir = anatomy.fill_root(staging_dir) src_path = os.path.normpath(os.path.join(staging_dir, filename))