diff --git a/app/clients/sms/aws_sns.py b/app/clients/sms/aws_sns.py index 22c86f357..285f1feaa 100644 --- a/app/clients/sms/aws_sns.py +++ b/app/clients/sms/aws_sns.py @@ -49,7 +49,6 @@ class AwsSnsClient(SmsClient): def send_sms(self, to, content, reference, sender=None, international=False): matched = False - print(hilite(f"TO {to}")) for match in phonenumbers.PhoneNumberMatcher(to, "US"): matched = True to = phonenumbers.format_number( diff --git a/app/delivery/send_to_providers.py b/app/delivery/send_to_providers.py index b965a73ea..19e132e4b 100644 --- a/app/delivery/send_to_providers.py +++ b/app/delivery/send_to_providers.py @@ -1,4 +1,5 @@ import json +from contextlib import suppress from urllib import parse from cachetools import TTLCache, cached @@ -129,7 +130,7 @@ def send_sms_to_provider(notification): def _get_verify_code(notification): key = f"2facode-{notification.id}".replace(" ", "") recipient = redis_store.get(key) - if recipient: + with suppress(AttributeError): recipient = recipient.decode("utf-8") return recipient