mirror of
				https://github.com/searxng/searxng.git
				synced 2025-11-03 19:17:07 -05:00 
			
		
		
		
	[fix] fix openstreetmap engine
close #298 This is a workaround: inside engine code, any call to function in another engine can crash since the logger won't be initialized except if it is done explicitly.
This commit is contained in:
		
							parent
							
								
									b57d776edb
								
							
						
					
					
						commit
						ea60c03827
					
				@ -439,3 +439,8 @@ def get_key_label(key_name, lang):
 | 
				
			|||||||
        if labels is None:
 | 
					        if labels is None:
 | 
				
			||||||
            return None
 | 
					            return None
 | 
				
			||||||
    return get_label(labels, lang)
 | 
					    return get_label(labels, lang)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def init(_):
 | 
				
			||||||
 | 
					    import searx.engines.wikidata  # pylint: disable=import-outside-toplevel
 | 
				
			||||||
 | 
					    searx.engines.wikidata.logger = logger
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user