Don't try to parse a nodeinfo document which is for example 404

Refs: https://github.com/friendica/friendica/issues/6472
merge-requests/139/head
Jason Robinson 2019-01-19 23:30:46 +02:00
rodzic 6985a49a9a
commit 2a5a7b76b1
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -73,7 +73,7 @@ def fetch_nodeinfo_document(host):
return
doc, status_code, error = fetch_document(url=url)
if not doc:
if status_code >= 300 and not doc:
return
doc = json.loads(doc)
return parse_nodeinfo_document(doc, host)