Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/api_data_source.py |
| diff --git a/chrome/common/extensions/docs/server2/api_data_source.py b/chrome/common/extensions/docs/server2/api_data_source.py |
| index 36d378073149634dc9430ea31df9b4021d36cc78..50df3a1b63f025b03ef28293b057b46473be66f3 100644 |
| --- a/chrome/common/extensions/docs/server2/api_data_source.py |
| +++ b/chrome/common/extensions/docs/server2/api_data_source.py |
| @@ -17,19 +17,25 @@ import third_party.json_schema_compiler.idl_parser as idl_parser |
| # Increment this version when there are changes to the data stored in any of |
| # the caches used by APIDataSource. This allows the cache to be invalidated |
| # without having to flush memcache on the production server. |
| -_VERSION = 0 |
| +_VERSION = 1 |
| def _RemoveNoDocs(item): |
| if type(item) == dict: |
| if item.get('nodoc', False): |
|
Aaron Boodman
2012/10/24 22:25:02
Weird to assume that only dictionaries can have 'n
cduvall
2012/10/26 00:01:47
I don't see how a type besides a dictionary could
|
| return True |
| + to_remove = [] |
| for key, value in item.items(): |
| if _RemoveNoDocs(value): |
| - del item[key] |
| + to_remove.append(key) |
| + for k in to_remove: |
| + del item[k] |
| elif type(item) == list: |
| + to_remove = [] |
| for i in item: |
| if _RemoveNoDocs(i): |
| - item.remove(i) |
| + to_remove.append(i) |
| + for i in to_remove: |
| + item.remove(i) |
| return False |
| def _CreateId(node, prefix): |