def restore(self): global c if self.cexecuted: from conary.lib import debugger debugger.st() return c.clear() self.cexecuted = {} assert self.usecache if not os.path.exists(self.cache): return try: cache = open(self.cache, 'rb') import marshal cexecuted = marshal.load(cache) cache.close() if isinstance(cexecuted, types.DictType): self.cexecuted = cexecuted #numEntries = sum([len(x) for x in self.cexecuted]) #open('/dev/tty', 'w').write('Restored %s lines for %s files from %s\n' % (numEntries, len(self.cexecuted), self.cache)) except: pass
def _interrupt(*args, **kw): from conary.lib import debugger if hasattr(debugger, 'serve'): debugger.serve() else: debugger.st()