Changeset 226819 in webkit


Ignore:
Timestamp:
Jan 11, 2018, 4:19:51 PM (7 years ago)
Author:
Jonathan Bedard
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r226816 r226819  
     12018-01-11  Jonathan Bedard  <jbedard@apple.com>
     2
     3        Commit queue failed to land a bug, 'NoneType' object has no attribute 'strip'
     4        https://bugs.webkit.org/show_bug.cgi?id=181561
     5        <rdar://problem/36452652>
     6
     7        Reviewed by Aakash Jain.
     8
     9        BeautifulSoup.find may return None, this case should be gracefully handled.
     10
     11        * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
     12        (BugzillaQueries._parse_result_count):
     13        (BugzillaQueries._fetch_bugs_from_advanced_query): Added logging.
     14
    1152018-01-11  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py

    r220715 r226819  
    140140    def _parse_result_count(self, results_page):
    141141        result_count_text = BeautifulSoup(results_page).find(attrs={'class': 'bz_result_count'}).string
     142        if result_count_text is None:
     143            _log.warn("BeautifulSoup returned None while finding class: bz_result_count in:\n{}".format(results_page))
     144            return 0
    142145        result_count_parts = result_count_text.strip().split(" ")
    143146        if result_count_parts[0] == "Zarro":
     
    163166            return [self._fetch_bug(bug_id)]
    164167        if not self._parse_result_count(results_page):
     168            _log.warn('Failed to find bugs for {}'.format(results_url))
    165169            return []
    166170        # Bugzilla results pages have an "XML" submit button at the bottom
Note: See TracChangeset for help on using the changeset viewer.