Update mailer.py with some improvements#415
Conversation
satterly
left a comment
There was a problem hiding this comment.
Thanks for the improvements! A few issues need addressing before this can be merged:
-
Bug: stale variable reference —
x.strip()should bec.strip()(or justc, sincerule_contactsvalues are already stripped). The old list comprehension variablexno longer exists, so this will raise aNameErrorat runtime whenever a matching non-exclude rule is found. -
breakon exclude match changes behavior — The newbreakafter an exclude rule means only the first matching exclude rule applies and no further rules are evaluated. Is this intentional? If so, please document the rationale. -
Main-thread exception handling removed — Removing the
except Exceptionblocks inmain()means main-thread exceptions now produce a full traceback to stderr instead of a clean message + exit. This is a behavior change worth noting.
Please fix #1 at minimum — it's a runtime crash.
Description
Fixes #393, making sure the mailer works
Changes
Checklist
Collaboration
When a user creates a pull request from a fork that they own, the user
generally has the authority to decide if other users can commit to the
pull request's compare branch. If the pull request author wants greater
collaboration, they can grant maintainers of the upstream repository
(that is, anyone with push access to the upstream repository) permission
to commit to the pull request's compare branch
See https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork