OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 logging.warning("No data to load.") | 179 logging.warning("No data to load.") |
180 return None | 180 return None |
181 | 181 |
182 data_futures = [(k, DataEntry.get_async(k)) for k in self._convert_blob_
keys(self.data_keys)] | 182 data_futures = [(k, DataEntry.get_async(k)) for k in self._convert_blob_
keys(self.data_keys)] |
183 | 183 |
184 data = [] | 184 data = [] |
185 for key, future in data_futures: | 185 for key, future in data_futures: |
186 result = future.get_result() | 186 result = future.get_result() |
187 if not result: | 187 if not result: |
188 logging.error("No data found for key: %s.", key) | 188 logging.error("No data found for key: %s.", key) |
189 return None | 189 # FIXME: This really shouldn't happen, but it seems to be happen
ing in practice. |
| 190 # Figure out how and then change this back to returning None. |
| 191 # In the meantime, return empty string so we at least start coll
ecting |
| 192 # results from new runs even though it'll mean that the old data
is lost. |
| 193 # crbug.com/377594 |
| 194 return '' |
190 data.append(result) | 195 data.append(result) |
191 | 196 |
192 self.data = "".join([d.data for d in data]) | 197 self.data = "".join([d.data for d in data]) |
193 | 198 |
194 return self.data | 199 return self.data |
OLD | NEW |