Skip to content

Commit

Permalink
Merge pull request #3 from klen/master
Browse files Browse the repository at this point in the history
proto.message encoding fix
  • Loading branch information
mrjoes committed Nov 3, 2011
2 parents 8cb51b2 + 03aba14 commit e67dcf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tornadio2/proto.py
Expand Up @@ -93,7 +93,7 @@ def message(endpoint, msg, message_id=None):
return '3:%s:%s:%s' % (
message_id or '',
endpoint or '',
msg.encode('utf-8')
msg.encode('utf-8') if isinstance(msg, unicode) else msg.decode('utf-8')
)


Expand Down

0 comments on commit e67dcf9

Please sign in to comment.