bin/crashreportScraper.py |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 452311610d38d7e147b2ec2345b76c1b29646159
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Aug 8 19:04:04 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Aug 9 09:51:33 2022 +0200

    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 <xiscofa...@libreoffice.org>

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

Reply via email to