Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Make python-rtmbot friendlier to encoding#44

Closed
tiphaine wants to merge 4 commits intoslack-samples:masterfrom
tiphaine:encoding-friendlier
Closed

Make python-rtmbot friendlier to encoding#44
tiphaine wants to merge 4 commits intoslack-samples:masterfrom
tiphaine:encoding-friendlier

Conversation

@tiphaine
Copy link

Hello,

In core.py, the message was still bytes (result of encode()) before being sent to the channel (send_message), this resulted in strings prefixed as bytes being displayed in the channel.
I also fixed a few lint warnings.

In doc/example-plugins/counter.py, time.time() generated an AttributeError because it was a float instead of a String.

tiphaine added 3 commits May 18, 2016 11:06
Python 3.5.1: The ‘message’ was encoded in bytes with encode('ascii',
'ignore') but it was not decoded in a string before sending it out in
the following send_message method. As a result, I had the string with
the b’prefix appearing in my slack channel.
@coveralls
Copy link

coveralls commented May 18, 2016

Coverage Status

Coverage remained the same at 28.387% when pulling 98ff72b on tiphaine:encoding-friendlier into 006e28f on slackhq:master.

Python 3.5.1: The ‘message’ was encoded in bytes with encode('ascii',
'ignore') but it was not decoded in a string before sending it out in
the following send_message method. As a result, I had the string with
the b’prefix appearing in my slack channel.

For real this time :)
@coveralls
Copy link

coveralls commented May 18, 2016

Coverage Status

Coverage remained the same at 28.387% when pulling 52c8cef on tiphaine:encoding-friendlier into 006e28f on slackhq:master.

@tiphaine tiphaine changed the title Encoding friendlier Make python-rtmbot friendlier to encoding May 18, 2016
@jammons
Copy link
Contributor

jammons commented Jun 5, 2016

Ok, I believe I've resolved this issue with #46. Please give it a look and feel free to add comments.

@jammons jammons closed this Jun 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants