diff --git a/utils/fix_links.py b/utils/fix_links.py index 0b8160f65180d840bb624b25705ce3c4e2c7fd2d..cb8e4afc8a2bc73a0e60afdc39659d2d579bf993 100644 --- a/utils/fix_links.py +++ b/utils/fix_links.py @@ -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']