initial commit for cleanup plugin, non active

This commit is contained in:
aardschok 2017-08-18 16:05:21 +02:00
parent f4fcdfb148
commit e0d9cecf7c

View file

@ -0,0 +1,20 @@
import os
from pyblish import api
class CleanUp(api.InstancePlugin):
"""Cleans up the staging directory after a successful publish
"""
order = api.IntegratorOrder + 10
def process(self, instance):
return
def clean_up(self, instance):
staging_dir = instance.get("stagingDir", None)
if staging_dir and os.path.exists(staging_dir):
self.log.info("Removing temporary folder ...")
os.rmdir(staging_dir)