mirror of
				https://gitlab.com/ceda_ei/sky
				synced 2025-10-25 00:20:05 +02:00 
			
		
		
		
	Fix 500 on unknown location
This commit is contained in:
		| @@ -169,7 +169,7 @@ def main(location, geocoder, cache_db, kind, unit): | |||||||
|     "Main function that returns the weather based on parameters" |     "Main function that returns the weather based on parameters" | ||||||
|     try: |     try: | ||||||
|         coordinates = get_coordinates(location, geocoder, cache_db) |         coordinates = get_coordinates(location, geocoder, cache_db) | ||||||
|     except KeyError: |     except (IndexError, KeyError): | ||||||
|         return "Location Not found" |         return "Location Not found" | ||||||
|     weather = get_weather(coordinates) |     weather = get_weather(coordinates) | ||||||
|     text = weather_to_text(weather, kind, unit, coordinates[2]) |     text = weather_to_text(weather, kind, unit, coordinates[2]) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user