Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mutalyzer
mutalyzer2
Commits
997368b1
Unverified
Commit
997368b1
authored
Dec 03, 2019
by
Mihai
Committed by
GitHub
Dec 03, 2019
Browse files
Merge pull request #495 from codeunsolved/fix-invalid-lrg-error
Fix invalid LRG record issue
parents
6562bf89
802a6379
Changes
1
Hide whitespace changes
Inline
Side-by-side
mutalyzer/Retriever.py
View file @
997368b1
...
...
@@ -781,7 +781,7 @@ class LRGRetriever(Retriever):
:returns: the full path to the file; None in case of an error.
:rtype: unicode
"""
url
=
'{}/{}.xml'
.
format
(
settings
.
LRG_PREFIX_URL
,
name
)
url
=
'{}/{}.xml'
.
format
(
settings
.
LRG_PREFIX_URL
.
rstrip
(
'/'
)
,
name
)
filename
=
None
try
:
...
...
@@ -811,7 +811,7 @@ class LRGRetriever(Retriever):
handle
=
urllib2
.
urlopen
(
url
)
info
=
handle
.
info
()
if
(
info
[
'Content-Type'
]
==
'application/xml'
and
if
(
info
[
'Content-Type'
]
in
[
'application/xml'
,
'text/xml'
]
and
'Content-length'
in
info
):
# Looks like a valid LRG file.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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