Exit with nicer error if lat/lon is not valid
This commit is contained in:
		
							parent
							
								
									0a7823db7a
								
							
						
					
					
						commit
						35c3ee20ed
					
				|  | @ -1119,7 +1119,13 @@ class Speedtest(object): | ||||||
|             'upload_max': upload_count * size_count |             'upload_max': upload_count * size_count | ||||||
|         }) |         }) | ||||||
| 
 | 
 | ||||||
|  |         try: | ||||||
|             self.lat_lon = (float(client['lat']), float(client['lon'])) |             self.lat_lon = (float(client['lat']), float(client['lon'])) | ||||||
|  |         except ValueError: | ||||||
|  |             raise SpeedtestConfigError( | ||||||
|  |                 'Unknown location: lat=%r lon=%r' % | ||||||
|  |                 (client.get('lat'), client.get('lon')) | ||||||
|  |             ) | ||||||
| 
 | 
 | ||||||
|         printer('Config:\n%r' % self.config, debug=True) |         printer('Config:\n%r' % self.config, debug=True) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue