Index: media/tools/bug_hunter/bug_hunter.py |
diff --git a/media/tools/bug_hunter/bug_hunter.py b/media/tools/bug_hunter/bug_hunter.py |
index 96a4289a3dde8597009658aa49c604296e553395..937318e7059bea37df82384af8fb464a30583a3e 100644 |
--- a/media/tools/bug_hunter/bug_hunter.py |
+++ b/media/tools/bug_hunter/bug_hunter.py |
@@ -86,7 +86,8 @@ _INTERVAL_UNIT_CHOICES = ('hours', 'days', 'weeks') |
_URL_EXCLUSION_LIST = ('http://www.youtube.com/html5', |
'http://www.google.com') |
_ISSUE_ELEMENT_IN_EMAIL_CHOICES = ('issue_id', 'author', 'status', 'state', |
- 'content', 'comments', 'labels', 'urls') |
+ 'content', 'comments', 'labels', 'urls', |
+ 'mstone') |
def ParseArgs(): |
@@ -246,12 +247,19 @@ class BugHunter(object): |
set(re.findall(r'(https?://\S+)', content + comments))) |
url_list = [url for url in url_list |
if not url.rstrip('/') in _URL_EXCLUSION_LIST] |
- issues.append({'issue_id': issue_id, 'title': entry.title.text, |
- 'author': entry.author[0].name.text, |
- 'status': entry.status.text, |
- 'state': entry.state.text, 'content': content, |
- 'comments': comments, 'labels': label_list, |
- 'urls': url_list}) |
+ mstone = '' |
+ r = re.compile(r'Mstone-(\d*)') |
+ for label in label_list: |
+ m = r.search(label) |
+ if m: |
+ mstone = m.group(1) |
+ issues.append( |
+ {'issue_id': issue_id, 'title': entry.title.text, |
+ 'author': entry.author[0].name.text, |
+ 'status': entry.status.text if entry.status is not None else '', |
+ 'state': entry.state.text if entry.status is not None else '', |
dennis_jeffrey
2012/02/28 02:10:59
entry.status --> entry.state
imasaki1
2012/02/29 00:04:22
Done.
|
+ 'content': content, 'mstone': mstone, 'comments': comments, |
+ 'labels': label_list, 'urls': url_list}) |
return sorted(issues, key=itemgetter('issue_id'), reverse=True) |
def _SetUpEmailSubjectMsg(self, issues): |