Skip to contentSkip to conversation

upgrade-helper.py: handle unassigned recipes correctly

PATCH New Alexander Kanavin 1 participant 1 message Dec 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 upgrade-helper.py: handle unassigned recipes correctly

Attempting to send to [email protected] bounces immediately, which means the CC recipients (such as oe-core list) won't get the email either.

Instead, send to cc directly.

---
 upgrade-helper.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
upgrade-helper.py +4 -1
index 7ed7af4..eb3935e 100755
@@ -320,7 +320,10 @@ class Updater(object):
 
         cc_addr = None
         if "cc_recipients" in settings:
-            cc_addr = settings["cc_recipients"].split()
+            if 'unassigned' in to_addr:
+                to_addr = settings["cc_recipients"].split()
+            else:
+                cc_addr = settings["cc_recipients"].split()
 
         newversion = pkg_ctx['NPV'] if not pkg_ctx['NPV'].endswith("new-commits-available") else pkg_ctx['NSRCREV']
         subject = "[AUH] " + pkg_ctx['PN'] + ": upgrading to " + newversion
Signature · 1 line
2.29.2