Commit ef082bfa authored by David Read's avatar David Read
Browse files

Merge branch 'master' of github.com:datagovuk/ckanext-archiver

parents 31964e9f fac32f45
......@@ -343,8 +343,8 @@ def download(context, resource, url_timeout=30,
stream=True, headers=headers)
url_redirected_to = res.url if url != res.url else None
if 'previous' in context:
if 'etag' in res.headers and context['previous'].etag == res.headers['etag']:
if context.get('previous') and ('etag' in res.headers):
if context.get('previous').etag == res.headers['etag']:
log.info("ETAG matches, not downloading content")
raise NotChanged("etag suggests content has not changed")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment