Ejegg has uploaded a new change for review. ( 
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(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/82/346482/1

diff --git a/processcontrol/mailer.py b/processcontrol/mailer.py
index 08bb432..d5be249 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: newchange
Gerrit-Change-Id: Ie72e3b10f5b5b2de84a548ceaa3e769946112712
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to