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
SOaAS
dbxref
Commits
598797f7
Commit
598797f7
authored
Apr 25, 2019
by
Lukas Jelonek
Browse files
Fix bug: 400 error code is interpreted as found
parent
44765088
Changes
1
Show whitespace changes
Inline
Side-by-side
dbxref/resolver.py
View file @
598797f7
...
@@ -61,7 +61,7 @@ def check_url_exists(url):
...
@@ -61,7 +61,7 @@ def check_url_exists(url):
try
:
try
:
r
=
sess
.
head
(
url
,
allow_redirects
=
True
,
timeout
=
1
)
r
=
sess
.
head
(
url
,
allow_redirects
=
True
,
timeout
=
1
)
r
.
close
()
r
.
close
()
if
r
.
status_code
<
=
400
:
if
r
.
status_code
<
400
:
return
STATUS_EXISTS
return
STATUS_EXISTS
else
:
else
:
logger
.
debug
(
'The server responded with status code: %s'
,
r
.
status_code
)
logger
.
debug
(
'The server responded with status code: %s'
,
r
.
status_code
)
...
...
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