Skip to content

Commit

Permalink
Don't convert status to bytes when truncating
Browse files Browse the repository at this point in the history
See issue #41

Signed-off-by: Jim Easterbrook <jim@jim-easterbrook.me.uk>
  • Loading branch information
jim-easterbrook committed Aug 31, 2016
1 parent ea42101 commit 3919ae2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pywws/ToTwitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def post(self, status, media):
max_len = 140
if media:
max_len -= len(media[:4]) * 23
status = status.encode('utf8')[:max_len].decode('utf8', errors='ignore')
status = status.strip()[:max_len]
if tuple(map(int, twitter.__version__.split('.'))) >= (3, 0):
args = dict(self.kwargs)
if media:
Expand Down
4 changes: 2 additions & 2 deletions src/pywws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '16.08.0'
_release = '1361'
_commit = 'ca4543e'
_release = '1362'
_commit = 'ea42101'

0 comments on commit 3919ae2

Please sign in to comment.