| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 | 3 |
| 4 from slave import recipe_api | 4 from recipe_engine import recipe_api |
| 5 | 5 |
| 6 class HaltApi(recipe_api.RecipeApi): | 6 class HaltApi(recipe_api.RecipeApi): |
| 7 | 7 |
| 8 def __call__(self, reason='Unknown', **kwargs): | 8 def __call__(self, reason='Unknown', **kwargs): |
| 9 """Return a failing step with the given message.""" | 9 """Return a failing step with the given message.""" |
| 10 name = kwargs.pop('name', 'Recipe failed.') | 10 name = kwargs.pop('name', 'Recipe failed.') |
| 11 name += ' Reason: ' + reason | 11 name += ' Reason: ' + reason |
| 12 | 12 |
| 13 self.m.python.inline(name, "import sys; sys.exit(1)") | 13 self.m.python.inline(name, "import sys; sys.exit(1)") |
| OLD | NEW |