workflow: do not log as error some geolocation failures (#18199)
This commit is contained in:
parent
89a235977c
commit
459fa64daf
|
@ -113,7 +113,7 @@ class GeolocateWorkflowStatusItem(WorkflowStatusItem):
|
|||
return
|
||||
|
||||
if not address:
|
||||
get_logger().error('error determining address')
|
||||
get_logger().debug('error geolocating string (empty string)')
|
||||
return
|
||||
|
||||
url = '%s/search?q=%s&format=json' % (nominatim_url, urllib2.quote(address))
|
||||
|
@ -151,6 +151,10 @@ class GeolocateWorkflowStatusItem(WorkflowStatusItem):
|
|||
return
|
||||
|
||||
value = self.compute(self.photo_variable)
|
||||
if not value:
|
||||
get_logger().debug('error geolocating from photo, no image')
|
||||
return
|
||||
|
||||
if not hasattr(value, 'get_file_pointer'):
|
||||
get_logger().error('error geolocating from photo, invalid variable')
|
||||
return
|
||||
|
@ -164,7 +168,7 @@ class GeolocateWorkflowStatusItem(WorkflowStatusItem):
|
|||
try:
|
||||
exif_data = image._getexif()
|
||||
except AttributeError:
|
||||
get_logger().error('error geolocating from photo, failed to get EXIF data')
|
||||
get_logger().debug('error geolocating from photo, failed to get EXIF data')
|
||||
return
|
||||
|
||||
if exif_data:
|
||||
|
|
Loading…
Reference in New Issue