diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-08-08 19:04:04 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-08-09 09:51:33 +0200 |
commit | 452311610d38d7e147b2ec2345b76c1b29646159 (patch) | |
tree | ec7b2b12b16a33a56da57e6659d8b67dc29b778b /bin | |
parent | b8e451af93c2917d70214c75bb6b6a8bf566813b (diff) |
crashreportScraper: continue when os_tab is not found
Change-Id: I293ad70ad2776bfa6ea3e075ba69428963301433
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137994
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/crashreportScraper.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/crashreportScraper.py b/bin/crashreportScraper.py index cad7feead645..b0ab5f5bd5f9 100755 --- a/bin/crashreportScraper.py +++ b/bin/crashreportScraper.py @@ -62,7 +62,12 @@ def parse_reports_and_get_most_recent_report_from_last_page(url): raise count = 0 - os_tab = soup.find("table", {"id": "os_tab"}).tbody + try: + os_tab = soup.find("table", {"id": "os_tab"}).tbody + except AttributeError: + print("os_tab not found") + raise + tr_list = os_tab.find_all("tr") for tr in tr_list: td_list = tr.find_all("td") @@ -206,5 +211,5 @@ if __name__ == '__main__': crashID, crashVersion, crashReason, crashOS, crashStack, codeLine, '\n']) f.write(line) f.flush() - except requests.exceptions.Timeout: + except (requests.exceptions.Timeout, AttributeError): continue |