handled exception for dns resolution + webring errors dont halt page gen.

This commit is contained in:
likho 2023-05-19 18:03:59 -07:00
parent 8a723c2bc8
commit 972165018c

View File

@ -385,6 +385,9 @@ if __name__ == "__main__":
except http.HTTPError as e:
print(e,": ", someone, file=sys.stderr)
pass
except http.URLError as e:
print(e, file=sys.stderr)
print("\t =>", someone, file=sys.stderr)
return other_people
# list_of_json_objs = []
# with open("meta.json",'r') as f:
@ -459,11 +462,11 @@ if __name__ == "__main__":
if cfg["webring"]["enabled"] == True:
export_profile(
len(p), p[0].get_epoch_time(), cfg["webring"] )
if "following" in cfg["webring"]:
fellows = fn1(cfg["webring"]["following"] )
if fellows != []:
updated += writepage(
tpl, fellows, tc, cfg["page"], subdir="placeholder" )
if "following" in cfg["webring"]:
fellows = fn1(cfg["webring"]["following"] )
if fellows != []:
updated += writepage(
tpl, fellows, tc, cfg["page"], subdir="placeholder" )
with open("updatedfiles.txt", 'w') as f:
for filename in updated:
print(filename, file=f) # sys.stderr)