Changeset 73950 in webkit
- Timestamp:
- Dec 13, 2010 12:36:22 PM (13 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r73938 r73950 1 2010-12-13 Eric Seidel <eric@webkit.org> 2 3 Unreviewed. 4 5 Teach webkit-patch how to search bugzilla 6 https://bugs.webkit.org/show_bug.cgi?id=50500 7 8 webkit-patch bug-search fails when there is only one result. 9 Turns out we needed a bit more logic in our result count parsing code. 10 11 * Scripts/webkitpy/common/net/bugzilla/bugzilla.py: 12 * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py: 13 1 14 2010-12-13 Antti Koivisto <antti@apple.com> 2 15 -
trunk/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
r73823 r73950 82 82 def _parse_result_count(self, results_page): 83 83 result_count_text = BeautifulSoup(results_page).find(attrs={'class': 'bz_result_count'}).string 84 result_count_parts = result_count_text.s plit(" ")84 result_count_parts = result_count_text.strip().split(" ") 85 85 if result_count_parts[0] == "Zarro": 86 86 return 0 87 if result_count_parts[0] == "One": 88 return 1 87 89 return int(result_count_parts[0]) 88 90 -
trunk/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
r73688 r73950 357 357 self._assert_result_count(queries, '<span class="bz_result_count">314 bugs found.</span><span class="bz_result_count">314 bugs found.</span>', 314) 358 358 self._assert_result_count(queries, '<span class="bz_result_count">Zarro Boogs found.</span>', 0) 359 self._assert_result_count(queries, '<span class="bz_result_count">\n \nOne bug found.</span>', 1) 359 360 self.assertRaises(Exception, queries._parse_result_count, ['Invalid']) 360 361
Note: See TracChangeset
for help on using the changeset viewer.