mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
return disabled cleanup plugin
This commit is contained in:
parent
4ea25d3418
commit
d339cade16
1 changed files with 18 additions and 18 deletions
|
|
@ -16,21 +16,21 @@ class CleanUp(pyblish.api.InstancePlugin):
|
|||
exclude_families = ["clip"]
|
||||
|
||||
def process(self, instance):
|
||||
# if [ef for ef in self.exclude_families
|
||||
# if instance.data["family"] in ef]:
|
||||
# return
|
||||
# import tempfile
|
||||
#
|
||||
# staging_dir = instance.data.get("stagingDir", None)
|
||||
# if not staging_dir or not os.path.exists(staging_dir):
|
||||
# self.log.info("No staging directory found: %s" % staging_dir)
|
||||
# return
|
||||
#
|
||||
# temp_root = tempfile.gettempdir()
|
||||
# if not os.path.normpath(staging_dir).startswith(temp_root):
|
||||
# self.log.info("Skipping cleanup. Staging directory is not in the "
|
||||
# "temp folder: %s" % staging_dir)
|
||||
# return
|
||||
#
|
||||
# self.log.info("Removing temporary folder ...")
|
||||
# shutil.rmtree(staging_dir)
|
||||
if [ef for ef in self.exclude_families
|
||||
if instance.data["family"] in ef]:
|
||||
return
|
||||
import tempfile
|
||||
|
||||
staging_dir = instance.data.get("stagingDir", None)
|
||||
if not staging_dir or not os.path.exists(staging_dir):
|
||||
self.log.info("No staging directory found: %s" % staging_dir)
|
||||
return
|
||||
|
||||
temp_root = tempfile.gettempdir()
|
||||
if not os.path.normpath(staging_dir).startswith(temp_root):
|
||||
self.log.info("Skipping cleanup. Staging directory is not in the "
|
||||
"temp folder: %s" % staging_dir)
|
||||
return
|
||||
|
||||
self.log.info("Removing temporary folder ...")
|
||||
shutil.rmtree(staging_dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue