Merge pull request #174 from tokejepsen/bugfix/clean_renders

Cleaning renders needs to be before staging directory checks.
This commit is contained in:
Milan Kolar 2020-06-01 21:03:54 +02:00 committed by GitHub
commit 0c1a484675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,8 +46,14 @@ class CleanUp(pyblish.api.InstancePlugin):
if (result["error"] is not None and result["instance"] is not None
and result["instance"] not in failed):
failed.append(result["instance"])
assert instance not in failed, ("Result of '{}' instance "
"were not success".format(instance.data["name"]))
assert instance not in failed, (
"Result of '{}' instance were not success".format(
instance.data["name"]
)
)
self.log.info("Cleaning renders ...")
clean_renders(instance)
if [ef for ef in self.exclude_families
if instance.data["family"] in ef]:
@ -65,7 +71,5 @@ class CleanUp(pyblish.api.InstancePlugin):
"temp folder: %s" % staging_dir)
return
self.log.info("Removing temporary folder ...")
self.log.info("Removing staging directory ...")
shutil.rmtree(staging_dir)
self.log.info("Cleaning renders ...")
clean_renders(instance)