Skip to content

Commit 7558efc

Browse files
committed
Not sending emails when running tests under localhost.
1 parent 955354b commit 7558efc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/seleniumbender.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,16 @@ def run_command(self, command):
4747
return subprocess.call(command, shell=True, executable=SHELL)
4848

4949
def send_mail_no_logs(self, identifier):
50+
if self.url == 'local':
51+
return
52+
5053
command = ['mail', '-s', '"Selenium Tests: {identifier} Failed To Run" {email} <<< "Something went wrong with {identifier} tests. Please check the logs."'.format(identifier=identifier, email=self.email)]
5154
self.run_command(command)
5255

5356
def send_mail_with_logs(self, identifier):
57+
if self.url == 'local':
58+
return
59+
5460
default_tests_dir = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
5561
root_dir = os.getenv('ROOTDIR', default_tests_dir)
5662

0 commit comments

Comments
 (0)