mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-20 23:26:42 +00:00
Catch ssl errors in broadcast
This commit is contained in:
parent
dcd4baed82
commit
9465455af2
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ import operator
|
|||
import logging
|
||||
from uuid import uuid4
|
||||
import requests
|
||||
from requests.exceptions import HTTPError, SSLError
|
||||
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Signature import pkcs1_15
|
||||
|
@ -440,7 +441,7 @@ def broadcast_task(sender_id, activity, recipients):
|
|||
for recipient in recipients:
|
||||
try:
|
||||
sign_and_send(sender, activity, recipient)
|
||||
except requests.exceptions.HTTPError as e:
|
||||
except (HTTPError, SSLError) as e:
|
||||
logger.exception(e)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue