def review_patch(self, patch): task = StyleQueueTask(self, patch) if not task.validate(): self._did_error(patch, "%s did not process patch." % self.name) return False try: return task.run() except UnableToApplyPatch, e: self._did_error(patch, "%s unable to apply patch." % self.name) return False
def review_patch(self, patch): task = StyleQueueTask(self, patch) if not task.validate(): self._did_error(patch, "%s did not process patch." % self.name) return False try: style_check_succeeded = task.run() if not style_check_succeeded: # Caller unlocks when review_patch returns True, so we only need to unlock on transient failure. self._unlock_patch(patch) return style_check_succeeded except UnableToApplyPatch, e: self._did_error(patch, "%s unable to apply patch." % self.name) return False