Commit b4a8d81b authored by alexandre's avatar alexandre

Fix #20 Add Python < 3.6 support for rdf_index command

parent 9c6f0962
......@@ -52,16 +52,16 @@ class Command(BaseCommand):
c = Client()
path = reverse('pad-read', kwargs={'mode': 'r', 'slug': pad.display_slug})
response = c.get(path)
url = f"http://{domain}{path}"
url = "http://{}{}".format(domain, path)
print(f"parsing {url}")
print("parsing {}".format(url))
if response.status_code == 200:
try:
app.graph.parse(data=tidy(response.content), format="rdfa", publicID=url)
except:
print(f"couldn't parse {url}")
print("couldn't parse {}".format(url))
else:
print(f"failed to parse {url}")
print("failed to parse {}".format(url))
# for quad in graph.quads():
......
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