Commit 802a6379 authored by codeunsolved's avatar codeunsolved
Browse files

Fix invalid LRG record issue

parent 6562bf89
......@@ -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
......@@ -811,7 +811,7 @@ class LRGRetriever(Retriever):
handle = urllib2.urlopen(url)
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.
Supports Markdown
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