Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 copy import copy | 5 from copy import copy |
| 6 import logging | 6 import logging |
| 7 import os | 7 import os |
| 8 import posixpath | 8 import posixpath |
| 9 | 9 |
| 10 from data_source import DataSource | 10 from data_source import DataSource |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 return 'properties' | 210 return 'properties' |
| 211 raise AssertionError('Could not classify node %s' % self) | 211 raise AssertionError('Could not classify node %s' % self) |
| 212 | 212 |
| 213 def GetAvailability(self): | 213 def GetAvailability(self): |
| 214 '''Returns availability information for this node. | 214 '''Returns availability information for this node. |
| 215 ''' | 215 ''' |
| 216 if self._GetCategory() in self._ignored_categories: | 216 if self._GetCategory() in self._ignored_categories: |
| 217 return None | 217 return None |
| 218 node_availability = self._LookupAvailability(self._lookup_path) | 218 node_availability = self._LookupAvailability(self._lookup_path) |
| 219 if node_availability is None: | 219 if node_availability is None: |
| 220 if not IsReleaseServer(): | 220 logging.warning('No availability found for: %s' % self) |
|
not at google - send to devlin
2014/07/15 21:12:04
hooray. these logs definitely go away then?
| |
| 221 # Bad, and happens a lot :( | |
| 222 logging.warning('No availability found for: %s' % self) | |
| 223 return None | 221 return None |
| 224 | 222 |
| 225 parent_node_availability = self._LookupAvailability(self._GetParentPath()) | 223 parent_node_availability = self._LookupAvailability(self._GetParentPath()) |
| 226 # If the parent node availability couldn't be found, something | 224 # If the parent node availability couldn't be found, something |
| 227 # is very wrong. | 225 # is very wrong. |
| 228 assert parent_node_availability is not None | 226 assert parent_node_availability is not None |
| 229 | 227 |
| 230 # Only render this node's availability if it differs from the parent | 228 # Only render this node's availability if it differs from the parent |
| 231 # node's availability. | 229 # node's availability. |
| 232 if node_availability == parent_node_availability: | 230 if node_availability == parent_node_availability: |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 770 getter = lambda: 0 | 768 getter = lambda: 0 |
| 771 getter.get = lambda api_name: self._GetImpl(platform, api_name).Get() | 769 getter.get = lambda api_name: self._GetImpl(platform, api_name).Get() |
| 772 return getter | 770 return getter |
| 773 | 771 |
| 774 def Cron(self): | 772 def Cron(self): |
| 775 futures = [] | 773 futures = [] |
| 776 for platform in GetPlatforms(): | 774 for platform in GetPlatforms(): |
| 777 futures += [self._GetImpl(platform, name) | 775 futures += [self._GetImpl(platform, name) |
| 778 for name in self._platform_bundle.GetAPIModels(platform).GetNames()] | 776 for name in self._platform_bundle.GetAPIModels(platform).GetNames()] |
| 779 return Collect(futures, except_pass=FileNotFoundError) | 777 return Collect(futures, except_pass=FileNotFoundError) |
| OLD | NEW |