-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix email notifications for shows with special cars. #9652
Conversation
* Make sure to look up the show by id's, in stead of by name.
@@ -65,15 +65,15 @@ def test_notify(self, host, port, smtp_from, use_tls, user, pwd, to): | |||
msg['Date'] = formatdate(localtime=True) | |||
return self._sendmail(host, port, smtp_from, use_tls, user, pwd, [to], msg, True) | |||
|
|||
def notify_snatch(self, title, message): | |||
def notify_snatch(self, title, message, ep_obj): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot to make it a keyword argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda did this on purpose. I had it as keyword first. But it's always called with an ep_obj. So no need to make it default to None.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But doesn't this defeat the purpose to use **kwargs for all other notifiers? We are forced to always add the email
argument for all notifiers like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the **kwargs param just prevents them from Errorring. As it's now its not causing any errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point is that it is pretty confusing right now. The method header should be equal for all and the arguments should be handled inside the function IMO.
* Update docstrings
fix #9500