def cacheLoad(cls, mappings): #from haystack.reverse.context import ReverserContext dumpname = os.path.normpath(mappings.name) Config.makeCache(dumpname) context_cache = Config.getCacheFilename(Config.CACHE_CONTEXT, dumpname) try: context = pickle.load(file(context_cache,'r')) except EOFError,e: os.remove(context_cache) log.error('Error in the context file. File cleaned. Please restart.') raise e