Limit number of retries to send an update notification; fix the smtplib.SMTP.sendmail() mock to also return success status
Description
Description
Details
Details
- Provenance
bruederli Authored on bruederli Pushed on May 26 2015, 2:18 PM - Parents
- rP0c072d69d677: Make locale encoding the default sys encoding; resolves T249
- Branches
- Unknown
- Tags
- Build Status
Buildable 542 Build 543: Continuous Integration for Software Development Projects
Event Timeline
Comment Actions
The added "break" in line 1219 does not make sense to me here. Or I don't know python. Also, shouldn't the smtp.quit() be out of the loop?
Comment Actions
The break statement simply gets us out of the while loop directly, omitting the time.sleep(10) and retries -= 1, returning whatever is the (boolean) result of smtp.sendmail().
smtp.sendmail() in turn should either return True, or remain False for all failures of smtp.sendmail() will trigger an exception.
Comment Actions
Yes, I got it. What about smtp.quit()? Will smtp.sendmail() retry work if you quit the connection?