コード例 #1
0
 def produceSandboxForWorkflow(self, workload, targetFile = None, includeWMCore = True ):
     """
     Given a workflow, builds a sandbox for interactive use
     """
     from WMCore.WMRuntime.SandboxCreator import SandboxCreator
     creator = SandboxCreator()
     if not includeWMCore:
         creator.disableWMCorePackaging()
     tempDir = tempfile.mkdtemp()
     try:
         tarballPath = creator.makeSandbox(tempDir, workload)
     finally:
         pass
     #    if os.path.exists( tempDir ):
     #        shutil.rmtree( tempDir )
     return tarballPath