| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from slave import recipe_api | 5 from recipe_engine import recipe_api |
| 6 from slave import recipe_util | |
| 7 | 6 |
| 8 | 7 |
| 9 class SwarmingClientApi(recipe_api.RecipeApi): | 8 class SwarmingClientApi(recipe_api.RecipeApi): |
| 10 """Code that both isolate and swarming recipe modules depend on. | 9 """Code that both isolate and swarming recipe modules depend on. |
| 11 | 10 |
| 12 Both swarming and isolate scripts live in a single repository called | 11 Both swarming and isolate scripts live in a single repository called |
| 13 'swarming client'. This module include common functionality like finding | 12 'swarming client'. This module include common functionality like finding |
| 14 existing swarming client checkout, fetching a new one, getting version of | 13 existing swarming client checkout, fetching a new one, getting version of |
| 15 a swarming script, etc. | 14 a swarming script, etc. |
| 16 """ | 15 """ |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 # TODO(martiniss) remove once recipe 1.5 migration done | 120 # TODO(martiniss) remove once recipe 1.5 migration done |
| 122 step_result = self.m.python.inline( | 121 step_result = self.m.python.inline( |
| 123 '%s is too old' % script, | 122 '%s is too old' % script, |
| 124 'import sys; sys.exit(1)', | 123 'import sys; sys.exit(1)', |
| 125 add_python_log=False) | 124 add_python_log=False) |
| 126 # TODO(martiniss) get rid of this bare string. | 125 # TODO(martiniss) get rid of this bare string. |
| 127 step_result.presentation.status = self.m.step.FAILURE | 126 step_result.presentation.status = self.m.step.FAILURE |
| 128 step_result.presentation.step_text = abort_reason | 127 step_result.presentation.step_text = abort_reason |
| 129 | 128 |
| 130 raise self.m.step.StepFailure(abort_reason) | 129 raise self.m.step.StepFailure(abort_reason) |
| OLD | NEW |