| Index: scripts/slave/recipe_modules/bot_update/api.py
|
| diff --git a/scripts/slave/recipe_modules/bot_update/api.py b/scripts/slave/recipe_modules/bot_update/api.py
|
| index 17add359bb5ed1c2bf0014f9ff93322e6b925705..c5d47e5985b411970e08925c0e1d82846472b4b1 100644
|
| --- a/scripts/slave/recipe_modules/bot_update/api.py
|
| +++ b/scripts/slave/recipe_modules/bot_update/api.py
|
| @@ -232,10 +232,13 @@ class BotUpdateApi(recipe_api.RecipeApi):
|
| # the checkout.
|
| # If there is a patch failure, emit another step that said things failed.
|
| if step_result.json.output.get('patch_failure'):
|
| - # TODO(phajdan.jr): Differentiate between failure to download the patch
|
| - # and failure to apply it. The first is an infra failure, the latter
|
| - # a definite patch failure.
|
| - self.m.tryserver.set_patch_failure_tryjob_result()
|
| + return_code = step_result.json.output.get('return_code')
|
| + if return_code == 3:
|
| + # This is download failure, hence an infra failure.
|
| + self.m.step.InfraFailure('Failed to download the patch')
|
| + else:
|
| + # This is actual patch failure.
|
| + self.m.tryserver.set_patch_failure_tryjob_result()
|
| self.m.python.failing_step(
|
| 'Patch failure', 'Check the bot_update step for details')
|
|
|
|
|