Skip to content
Snippets Groups Projects
Commit 6e0d5ac7 authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Improved log messages

parent 49a95979
No related branches found
No related tags found
No related merge requests found
......@@ -101,7 +101,7 @@ def fix_links( links, credentials=None ):
with_credentials = False
for domain in credentials:
if domain in link['url'] and credentials[domain]['username'] != None and credentials[domain]['password']:
logging.info('Found a valid credential.')
logging.info('Found a valid credential for %s' % link['url'])
with_credentials = True
username = credentials[domain]['username']
password = credentials[domain]['password']
......@@ -130,7 +130,7 @@ def fix_links( links, credentials=None ):
fixed_links[k]['protocol'] = translate_content_type(resp.headers['Content-Type'])
except Exception as e:
logging.debug(e)
logging.debug('Did not manage to HEAD %s (%s)' % (link['url'], e))
# ...otherwise, we make a guess on the basis of the information carried by the URL
known_formats = ['ecw', 'pdf', 'zip', 'json', 'tif', 'tiff', 'csv']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment