diff --git a/eccs2.py b/eccs2.py index 80e3255933ea3548af972f57dbdf915458ade34d..a0d7d9fb3bac1f9e09f04b95a8de0cd8d0cc8fd7 100755 --- a/eccs2.py +++ b/eccs2.py @@ -7,7 +7,7 @@ import re import requests import sys -from eccs2properties import DAY, ECCS2HTMLDIR, ECCS2OUTPUTDIR, ECCS2RESULTSLOG, ECCS2SPS, ECCS2SELENIUMDEBUG,ROBOTS_USER_AGENT,ECCS2REQUESTSTIMEOUT, FEDS_DISABLED_DICT, IDPS_DISABLED_DICT +from eccs2properties import DAY, ECCS2HTMLDIR, ECCS2OUTPUTDIR, ECCS2RESULTSLOG, ECCS2SPS, ECCS2SELENIUMDEBUG,ROBOTS_USER_AGENT,ECCS2REQUESTSTIMEOUT, FEDS_DISABLED_DICT, IDPS_DISABLED_DICT, ECCS2SELENIUMPAGELOADTIMEOUT from pathlib import Path from selenium.common.exceptions import TimeoutException from urllib3.util import parse_url @@ -47,8 +47,6 @@ def checkIdP(sp,idp,test): return None # Configure Blacklists - #federations_disabled_list = FEDS_DISABLED_LIST - #idps_disabled_list = IDPS_DISABLED_LIST federations_disabled_dict = FEDS_DISABLED_DICT idps_disabled_dict = IDPS_DISABLED_DICT @@ -97,7 +95,7 @@ def checkIdP(sp,idp,test): if (test is not True): # Put an empty string into the page_source file with open("%s/%s/%s---%s.html" % (ECCS2HTMLDIR,DAY,label_idp,fqdn_sp),"w") as html: - html.write("") + html.write("<html><h1>The IdP Login page was not loaded within %d seconds.</h1></html>" % ECCS2SELENIUMPAGELOADTIMEOUT ) else: print("\n[page_source of '%s' for sp '%s']\nNo source code" % (label_idp,fqdn_sp)) return (idp['entityID'],wayfless_url,check_time,"(failed)","Timeout")