forked from mirrors/bookwyrm
Merge pull request #648 from mouse-reeve/ssl-errors
Catch ssl errors in broadcast
This commit is contained in:
commit
59f486dc17
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ import operator
|
||||||
import logging
|
import logging
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
import requests
|
import requests
|
||||||
|
from requests.exceptions import HTTPError, SSLError
|
||||||
|
|
||||||
from Crypto.PublicKey import RSA
|
from Crypto.PublicKey import RSA
|
||||||
from Crypto.Signature import pkcs1_15
|
from Crypto.Signature import pkcs1_15
|
||||||
|
@ -440,7 +441,7 @@ def broadcast_task(sender_id, activity, recipients):
|
||||||
for recipient in recipients:
|
for recipient in recipients:
|
||||||
try:
|
try:
|
||||||
sign_and_send(sender, activity, recipient)
|
sign_and_send(sender, activity, recipient)
|
||||||
except requests.exceptions.HTTPError as e:
|
except (HTTPError, SSLError) as e:
|
||||||
logger.exception(e)
|
logger.exception(e)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue