def _translate_into_history(self, ad): failure = None if ad.failure is not None: # NOTE(harlowja): Try to use our local cache to get a more # complete failure object that has a traceback (instead of the # one that is saved which will *typically* not have one)... cached = self._failures.get(ad.name) if ad.failure.matches(cached): failure = cached else: failure = ad.failure return retry.History(ad.results, failure=failure)
def _translate_into_history(self, ad): failure = None if ad.failure is not None: # NOTE(harlowja): Try to use our local cache to get a more # complete failure object that has a traceback (instead of the # one that is saved which will *typically* not have one)... failure = ad.failure fail_cache = self._failures[ad.name] try: fail = fail_cache[states.EXECUTE] if failure.matches(fail): failure = fail except KeyError: pass return retry.History(ad.results, failure=failure)