workflow: do not log as error some geolocation failures (#18199)

This commit is contained in:
Frédéric Péters 2017-08-29 08:00:22 +02:00
parent 89a235977c
commit 459fa64daf
1 changed files with 6 additions and 2 deletions

View File

@ -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: