handled exception for dns resolution + webring errors dont halt page gen.
This commit is contained in:
parent
8a723c2bc8
commit
972165018c
13
microblog.py
13
microblog.py
@ -385,6 +385,9 @@ if __name__ == "__main__":
|
|||||||
except http.HTTPError as e:
|
except http.HTTPError as e:
|
||||||
print(e,": ", someone, file=sys.stderr)
|
print(e,": ", someone, file=sys.stderr)
|
||||||
pass
|
pass
|
||||||
|
except http.URLError as e:
|
||||||
|
print(e, file=sys.stderr)
|
||||||
|
print("\t =>", someone, file=sys.stderr)
|
||||||
return other_people
|
return other_people
|
||||||
# list_of_json_objs = []
|
# list_of_json_objs = []
|
||||||
# with open("meta.json",'r') as f:
|
# with open("meta.json",'r') as f:
|
||||||
@ -459,11 +462,11 @@ if __name__ == "__main__":
|
|||||||
if cfg["webring"]["enabled"] == True:
|
if cfg["webring"]["enabled"] == True:
|
||||||
export_profile(
|
export_profile(
|
||||||
len(p), p[0].get_epoch_time(), cfg["webring"] )
|
len(p), p[0].get_epoch_time(), cfg["webring"] )
|
||||||
if "following" in cfg["webring"]:
|
if "following" in cfg["webring"]:
|
||||||
fellows = fn1(cfg["webring"]["following"] )
|
fellows = fn1(cfg["webring"]["following"] )
|
||||||
if fellows != []:
|
if fellows != []:
|
||||||
updated += writepage(
|
updated += writepage(
|
||||||
tpl, fellows, tc, cfg["page"], subdir="placeholder" )
|
tpl, fellows, tc, cfg["page"], subdir="placeholder" )
|
||||||
with open("updatedfiles.txt", 'w') as f:
|
with open("updatedfiles.txt", 'w') as f:
|
||||||
for filename in updated:
|
for filename in updated:
|
||||||
print(filename, file=f) # sys.stderr)
|
print(filename, file=f) # sys.stderr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user