jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/346482 )

Change subject: Add host name to failmail subject
......................................................................


Add host name to failmail subject

Would be cool to template this stuff. What else would we want?

Bug: T162214
Change-Id: Ie72e3b10f5b5b2de84a548ceaa3e769946112712
---
M processcontrol/mailer.py
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Awight: Looks good to me, approved



diff --git a/processcontrol/mailer.py b/processcontrol/mailer.py
index 08bb432..2d74472 100644
--- a/processcontrol/mailer.py
+++ b/processcontrol/mailer.py
@@ -1,5 +1,6 @@
 from email.mime.text import MIMEText
 import smtplib
+import socket
 
 
 class Mailer(object):
@@ -17,7 +18,10 @@
 
         msg = MIMEText(body)
 
-        msg["Subject"] = "Fail Mail : " + subject
+        msg["Subject"] = "Fail Mail ({host}) run-job: {subject}".format(
+            host=socket.gethostname(),  # Why not os.gethostname?
+            subject=subject
+        )
         msg["From"] = self.from_address
         msg["To"] = self.to_address
 

-- 
To view, visit https://gerrit.wikimedia.org/r/346482
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie72e3b10f5b5b2de84a548ceaa3e769946112712
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to