From f46991d6751efaac1687c12a74a92d913d61ac54 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 11 Feb 2021 22:32:56 +0300 Subject: modify code for link_checker --- test/requests/links_scraper/genelinks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/requests') diff --git a/test/requests/links_scraper/genelinks.py b/test/requests/links_scraper/genelinks.py index 00a71d57..ca98f62f 100644 --- a/test/requests/links_scraper/genelinks.py +++ b/test/requests/links_scraper/genelinks.py @@ -109,10 +109,11 @@ def webpages_to_check(): if __name__ == '__main__': for page in webpages_to_check(): fetch_page_links(page) - if BROKEN_LINKS is not None: + if len(BROKEN_LINKS) > 0: print("THE LINKS BELOW ARE BROKEN>>>>>>>>>>>>>") for link in BROKEN_LINKS: print(link) - raise SystemExit( - "The links Above are broken.Please contact genenetwork.org<<<<<<<<") + if len(BROKEN_LINKS) > 0: + raise SystemExit( + "The links Above are broken.Please contact genenetwork.org<<<<<<<<") -- cgit v1.2.3