def saveBootstrapLoaderPomset(self, outputPath=None): # default to the library's specified dir if outputPath is None: outputPath = os.path.join( self.bootstrapLoaderDefinitionsDir(), 'loadLibraryDefinitions.pomset') pomset = self.generateBootstrapLoaderPomset() pomsetContext = ContextModule.wrapPomsetInContext(pomset) ContextModule.savePomsetAs(pomsetContext, outputPath) return
def pickleAndReloadDefinition(path, definition): # try pickling the definition # and the reloading it filesToDelete = [] try: pomsetContext = ContextModule.wrapPomsetInContext(definition) ContextModule.savePomsetAs(pomsetContext, path) filesToDelete.append(path) pomsetContext = ContextModule.loadPomset(path) definition = pomsetContext.reference() except Exception, e: logging.error("errored with msg >> %s" % e) raise