mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
flake8 - misc flake8 errs.
* unused variables * variables in loops overshadowing imports * excepts with no defined exc type (tried to avoid `except Exception` too) * history mapper is still too complex * default variables should never be mutable
This commit is contained in:
@@ -7,6 +7,7 @@ from notifications_utils.recipients import (
|
||||
validate_and_format_email_address
|
||||
)
|
||||
from notifications_utils.template import HTMLEmailTemplate, PlainTextEmailTemplate, SMSMessageTemplate
|
||||
from requests.exceptions import HTTPError
|
||||
|
||||
from app import clients, statsd_client, create_uuid
|
||||
from app.dao.notifications_dao import (
|
||||
@@ -60,7 +61,7 @@ def send_sms_to_provider(notification):
|
||||
update_notification(notification, provider)
|
||||
try:
|
||||
send_sms_response(provider.get_name(), str(notification.id), notification.to)
|
||||
except:
|
||||
except HTTPError:
|
||||
# when we retry, we only do anything if the notification is in created - it's currently in sending,
|
||||
# so set it back so that we actually attempt the callback again
|
||||
notification.sent_at = None
|
||||
|
||||
Reference in New Issue
Block a user