catch IndexError exception

jsonld-outbound
Alain St-Denis 2022-11-22 13:06:57 +00:00
rodzic 373aaa8da0
commit 32faf8e3b8
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -215,7 +215,7 @@ def try_retrieve_webfinger_document(handle: str) -> Optional[str]:
"""
try:
host = handle.split("@")[1]
except AttributeError:
except (AttributeError, IndexError):
logger.warning("retrieve_webfinger_document: invalid handle given: %s", handle)
return None
document, code, exception = fetch_document(