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: | ||||
|                     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) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user