Merge branch 'main' into avm99963-monorail
Merged commit cd4b3b336f1f14afa02990fdc2eec5d9467a827e
GitOrigin-RevId: e67bbf185d5538e1472bb42e0abb2a141f88bac1
diff --git a/features/alert2issue.py b/features/alert2issue.py
index fbaf5d9..daf72ca 100644
--- a/features/alert2issue.py
+++ b/features/alert2issue.py
@@ -10,7 +10,7 @@
import itertools
import logging
-import rfc822
+import email.utils
import settings
from businesslogic import work_env
@@ -227,7 +227,7 @@
owner_email = owner_email.strip()
if not owner_email:
return framework_constants.NO_USER_SPECIFIED
- emails = [addr for _, addr in rfc822.AddressList(owner_email)]
+ emails = [addr for _, addr in email.utils.getaddresses([owner_email])]
return user_svc.LookupExistingUserIDs(
cnxn, emails).get(owner_email) or framework_constants.NO_USER_SPECIFIED
@@ -237,7 +237,7 @@
cc_emails = cc_emails.strip()
if not cc_emails:
return []
- emails = [addr for _, addr in rfc822.AddressList(cc_emails)]
+ emails = [addr for _, addr in email.utils.getaddresses([cc_emails])]
return [userID for _, userID
in user_svc.LookupExistingUserIDs(cnxn, emails).iteritems()
if userID is not None]