Update run_console_tests.py

Fixed exception in lines 24 and 31 when the Exception object does not contain a sauce_labs_job_id property
This commit is contained in:
Axel 2016-07-11 14:30:37 +02:00 committed by GitHub
parent c4e3d546da
commit 5ef9219e3c
1 changed files with 2 additions and 2 deletions

View File

@ -21,14 +21,14 @@ for test,error_msg in c.failures+c.skipped+c.errors:
try:
sauce_client.jobs.update_job(test.sauce_labs_job_id, passed=False,tags=[environ["TRAVIS_BRANCH"],test.id()],build_num=environ["TRAVIS_JOB_NUMBER"],name=str(environ["TRAVIS_COMMIT"])+"_"+str(test.id().split('.')[1]))
except:
print "Could not annotate Sauce Labs job #%s" % str(test.sauce_labs_job_id)
print "Could not annotate Sauce Labs job #%s" % str(test)
next
for test,error_msg in c.success:
try:
sauce_client.jobs.update_job(test.sauce_labs_job_id, passed=True,tags=[environ["TRAVIS_BRANCH"],test.id()],build_num=environ["TRAVIS_JOB_NUMBER"],name=str(environ["TRAVIS_COMMIT"])+"_"+str(test.id().split('.')[1]))
except:
print "Could not annotate Sauce Labs job #%s" % str(test.sauce_labs_job_id)
print "Could not annotate Sauce Labs job #%s" % str(test)
next