Log Unicode exception instead of printing them to the console when they occur building the email alias files.

- Legacy-Id: 18909
This commit is contained in:
Russ Housley 2021-03-09 21:19:11 +00:00
parent 469c67296e
commit 44d8caaaae

View file

@ -17,6 +17,7 @@ Mailing list alias dumping utilities
from django.conf import settings from django.conf import settings
from ietf.utils.log import log
import debug # pyflakes:ignore import debug # pyflakes:ignore
@ -75,7 +76,7 @@ def dump_sublist(afile, vfile, alias, adomains, vdomain, emails):
# If there's unicode in email address, something is badly # If there's unicode in email address, something is badly
# wrong and we just silently punt # wrong and we just silently punt
# XXX - is there better approach? # XXX - is there better approach?
print('# Error encoding', alias, repr(emails)) log('Error encoding email address for an %s alias: %s' % (alias, repr(emails)))
return [] return []
return emails return emails