diff options
author | Alexander Kabui | 2021-02-11 22:32:56 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-02-13 16:55:08 +0300 |
commit | f46991d6751efaac1687c12a74a92d913d61ac54 (patch) | |
tree | 7fb1088c1b983ba8133136fd4d8c0b443a6cc4ce /test/requests/links_scraper/genelinks.py | |
parent | 03cdfbe9f59414cd5c1d44a7be8c69a41c469930 (diff) | |
download | genenetwork2-f46991d6751efaac1687c12a74a92d913d61ac54.tar.gz |
modify code for link_checker
Diffstat (limited to 'test/requests/links_scraper/genelinks.py')
-rw-r--r-- | test/requests/links_scraper/genelinks.py | 7 |
1 files changed, 4 insertions, 3 deletions
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<<<<<<<<") |