| 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 import contextlib | 5 import contextlib |
| 6 import hashlib | 6 import hashlib |
| 7 | 7 |
| 8 from slave import recipe_api | 8 from recipe_engine import recipe_api |
| 9 | 9 |
| 10 | 10 |
| 11 PATCH_STORAGE_RIETVELD = 'rietveld' | 11 PATCH_STORAGE_RIETVELD = 'rietveld' |
| 12 PATCH_STORAGE_GIT = 'git' | 12 PATCH_STORAGE_GIT = 'git' |
| 13 PATCH_STORAGE_SVN = 'svn' | 13 PATCH_STORAGE_SVN = 'svn' |
| 14 | 14 |
| 15 | 15 |
| 16 class TryserverApi(recipe_api.RecipeApi): | 16 class TryserverApi(recipe_api.RecipeApi): |
| 17 def __init__(self, *args, **kwargs): | 17 def __init__(self, *args, **kwargs): |
| 18 super(TryserverApi, self).__init__(*args, **kwargs) | 18 super(TryserverApi, self).__init__(*args, **kwargs) |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 self.add_failure_reason(e.reason) | 219 self.add_failure_reason(e.reason) |
| 220 | 220 |
| 221 failure_hash = hashlib.sha1() | 221 failure_hash = hashlib.sha1() |
| 222 failure_hash.update(self.m.json.dumps(self._failure_reasons)) | 222 failure_hash.update(self.m.json.dumps(self._failure_reasons)) |
| 223 | 223 |
| 224 step_result = self.m.step.active_result | 224 step_result = self.m.step.active_result |
| 225 step_result.presentation.properties['failure_hash'] = \ | 225 step_result.presentation.properties['failure_hash'] = \ |
| 226 failure_hash.hexdigest() | 226 failure_hash.hexdigest() |
| 227 | 227 |
| 228 raise | 228 raise |
| OLD | NEW |