kopia lustrzana https://github.com/n1ywb/python-hamtools
better error checking
rodzic
e397656133
commit
63d61c119c
|
@ -117,7 +117,7 @@ class FCCReferencer(object):
|
||||||
if data['status'] != 'VALID':
|
if data['status'] != 'VALID':
|
||||||
raise GeoRefError('invalid')
|
raise GeoRefError('invalid')
|
||||||
raw_lon = data['location']['longitude']
|
raw_lon = data['location']['longitude']
|
||||||
raw_lat = float(data['location']['latitude'])
|
raw_lat = data['location']['latitude']
|
||||||
if not raw_lon or not raw_lat:
|
if not raw_lon or not raw_lat:
|
||||||
raise GeoRefError("No location data")
|
raise GeoRefError("No location data")
|
||||||
try:
|
try:
|
||||||
|
|
Ładowanie…
Reference in New Issue