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

Side by Side Diff: chrome/common/extensions/docs/server2/known_issues_data_source.py

Issue 11315018: Extensions Docs Server: Generalize $ref's to work for any schema node (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years, 1 month 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 (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 import csv 5 import csv
6 import logging 6 import logging
7 import operator 7 import operator
8 from StringIO import StringIO 8 from StringIO import StringIO
9 9
10 import object_store 10 import object_store
(...skipping 24 matching lines...) Expand all
35 for issue_dict in issues_reader: 35 for issue_dict in issues_reader:
36 id = issue_dict.get('ID', '') 36 id = issue_dict.get('ID', '')
37 title = issue_dict.get('Summary', '') 37 title = issue_dict.get('Summary', '')
38 if not id or not title: 38 if not id or not title:
39 continue 39 continue
40 issues.append({ 'id': id, 'title': title }) 40 issues.append({ 'id': id, 'title': title })
41 issues = sorted(issues, key=operator.itemgetter('title')) 41 issues = sorted(issues, key=operator.itemgetter('title'))
42 self._object_store.Set(url, issues, object_store.KNOWN_ISSUES) 42 self._object_store.Set(url, issues, object_store.KNOWN_ISSUES)
43 return issues 43 return issues
44 44
45 def __getitem__(self, key):
46 return self.get(key)
47
48 def get(self, key): 45 def get(self, key):
49 return { 46 return {
50 'open': self.GetIssues(OPEN_ISSUES_CSV_URL), 47 'open': self.GetIssues(OPEN_ISSUES_CSV_URL),
51 'closed': self.GetIssues(CLOSED_ISSUES_CSV_URL) 48 'closed': self.GetIssues(CLOSED_ISSUES_CSV_URL)
52 }.get(key, None) 49 }.get(key, None)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698