Title: [264831] trunk/Tools
Revision
264831
Author
[email protected]
Date
2020-07-24 09:28:18 -0700 (Fri, 24 Jul 2020)

Log Message

[ews] Disable email sending on testing instances of ews
https://bugs.webkit.org/show_bug.cgi?id=214738

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/send_email.py:
(send_email):

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-build/send_email.py (264830 => 264831)


--- trunk/Tools/BuildSlaveSupport/ews-build/send_email.py	2020-07-24 16:26:37 UTC (rev 264830)
+++ trunk/Tools/BuildSlaveSupport/ews-build/send_email.py	2020-07-24 16:28:18 UTC (rev 264831)
@@ -20,8 +20,11 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import os
 import smtplib
 
+is_test_mode_enabled = os.getenv('BUILDBOT_PRODUCTION') is None
+
 BOT_WATCHERS_EMAILS = ['[email protected]']
 FROM_EMAIL = '[email protected]'
 SERVER = 'localhost'
@@ -28,6 +31,8 @@
 
 
 def send_email(to_emails, subject, text):
+    if is_test_mode_enabled:
+        return
     if not to_emails:
         print('Skipping email since no recipient is specified')
         return

Modified: trunk/Tools/ChangeLog (264830 => 264831)


--- trunk/Tools/ChangeLog	2020-07-24 16:26:37 UTC (rev 264830)
+++ trunk/Tools/ChangeLog	2020-07-24 16:28:18 UTC (rev 264831)
@@ -1,5 +1,15 @@
 2020-07-24  Aakash Jain  <[email protected]>
 
+        [ews] Disable email sending on testing instances of ews
+        https://bugs.webkit.org/show_bug.cgi?id=214738
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/send_email.py:
+        (send_email):
+
+2020-07-24  Aakash Jain  <[email protected]>
+
         [ews] Notify bot watchers about build being broken
         https://bugs.webkit.org/show_bug.cgi?id=214727
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to