Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MJU-POPS
ckanext-archiver
Commits
fac32f45
Commit
fac32f45
authored
Jan 14, 2016
by
Ross Jones
Browse files
Fixes problem with archival when previous is missing
parent
107cef68
Changes
1
Hide whitespace changes
Inline
Side-by-side
ckanext/archiver/tasks.py
View file @
fac32f45
...
...
@@ -314,8 +314,8 @@ def download(context, resource, url_timeout=30,
stream
=
True
)
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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment