Title: [226819] trunk/Tools
- Revision
- 226819
- Author
- [email protected]
- Date
- 2018-01-11 16:19:51 -0800 (Thu, 11 Jan 2018)
Log Message
Commit queue failed to land a bug, 'NoneType' object has no attribute 'strip'
https://bugs.webkit.org/show_bug.cgi?id=181561
<rdar://problem/36452652>
Reviewed by Aakash Jain.
BeautifulSoup.find may return None, this case should be gracefully handled.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(BugzillaQueries._parse_result_count):
(BugzillaQueries._fetch_bugs_from_advanced_query): Added logging.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (226818 => 226819)
--- trunk/Tools/ChangeLog 2018-01-12 00:18:32 UTC (rev 226818)
+++ trunk/Tools/ChangeLog 2018-01-12 00:19:51 UTC (rev 226819)
@@ -1,3 +1,17 @@
+2018-01-11 Jonathan Bedard <[email protected]>
+
+ Commit queue failed to land a bug, 'NoneType' object has no attribute 'strip'
+ https://bugs.webkit.org/show_bug.cgi?id=181561
+ <rdar://problem/36452652>
+
+ Reviewed by Aakash Jain.
+
+ BeautifulSoup.find may return None, this case should be gracefully handled.
+
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+ (BugzillaQueries._parse_result_count):
+ (BugzillaQueries._fetch_bugs_from_advanced_query): Added logging.
+
2018-01-11 Alexey Proskuryakov <[email protected]>
run-webkit-tests fails when there is a curly brace in Xcode build output
Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py (226818 => 226819)
--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py 2018-01-12 00:18:32 UTC (rev 226818)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py 2018-01-12 00:19:51 UTC (rev 226819)
@@ -139,6 +139,9 @@
# This is kinda a hack. There is probably a better way to get this information from bugzilla.
def _parse_result_count(self, results_page):
result_count_text = BeautifulSoup(results_page).find(attrs={'class': 'bz_result_count'}).string
+ if result_count_text is None:
+ _log.warn("BeautifulSoup returned None while finding class: bz_result_count in:\n{}".format(results_page))
+ return 0
result_count_parts = result_count_text.strip().split(" ")
if result_count_parts[0] == "Zarro":
return 0
@@ -162,6 +165,7 @@
bug_id = int(results_url.split("=")[-1])
return [self._fetch_bug(bug_id)]
if not self._parse_result_count(results_page):
+ _log.warn('Failed to find bugs for {}'.format(results_url))
return []
# Bugzilla results pages have an "XML" submit button at the bottom
# which can be used to get an XML page containing all of the <bug> elements.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes