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 datetime | 5 import datetime |
6 import functools | 6 import functools |
7 | 7 |
8 from infra.libs.infra_types import freeze | 8 from recipe_engine.types import freeze |
9 from recipe_engine import recipe_api | 9 from recipe_engine import recipe_api |
10 | 10 |
11 | 11 |
12 # Minimally supported version of swarming.py script (reported by --version). | 12 # Minimally supported version of swarming.py script (reported by --version). |
13 MINIMAL_SWARMING_VERSION = (0, 4, 10) | 13 MINIMAL_SWARMING_VERSION = (0, 4, 10) |
14 | 14 |
15 | 15 |
16 class ReadOnlyDict(dict): | 16 class ReadOnlyDict(dict): |
17 def __setitem__(self, key, value): | 17 def __setitem__(self, key, value): |
18 raise TypeError('ReadOnlyDict is immutable') | 18 raise TypeError('ReadOnlyDict is immutable') |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 | 814 |
815 def get_shard_view_url(self, index): | 815 def get_shard_view_url(self, index): |
816 """Returns URL of HTML page with shard details or None if not available. | 816 """Returns URL of HTML page with shard details or None if not available. |
817 | 817 |
818 Works only after the task has been successfully triggered. | 818 Works only after the task has been successfully triggered. |
819 """ | 819 """ |
820 if self._trigger_output and self._trigger_output.get('tasks'): | 820 if self._trigger_output and self._trigger_output.get('tasks'): |
821 for shard_dict in self._trigger_output['tasks'].itervalues(): | 821 for shard_dict in self._trigger_output['tasks'].itervalues(): |
822 if shard_dict['shard_index'] == index: | 822 if shard_dict['shard_index'] == index: |
823 return shard_dict['view_url'] | 823 return shard_dict['view_url'] |
OLD | NEW |