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
Allow send() to skip appending newline at the end. #25
Conversation
This is odd. I added a test case that works on my machine, but fails in travis. Any ideas @fgimian? |
"""Saves and sends the send string provided.""" | ||
self.current_send_string = send_string | ||
self.channel.send(send_string + self.newline) |
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 would suggest doing this a bit diffrent
something like
def send(self, send_string, newline=None):
newline = newline if newline else self.newline
self.current_send_string = send_string
self.channel.send(send_string + newline)
@mzagozen thanks for you input as for testing in CI, what did you expect to happen ? |
after looking into the CI jobs, it's not your fault it was failing the docker image I was using there was renamed, I'll deliver a fix to master soon... |
Sometimes, you only want to send a control character (Ctrl-C) without a newline.
This PR adds a new optional
newline
boolean parameter to thesend()
method to override the default behavior.