Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: scripts/slave/recipe_modules/swarming/api.py

Issue 1241323004: Cross-repo recipe package system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: PRESUBMIT-related touchups Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698