Merge pull request #29 from edsu/media-post-value-error

media_post ValueError
This commit is contained in:
Lorenz Diener 2017-04-10 09:39:13 +02:00 cometido por GitHub
commit 795354a835

Veure arxiu

@ -565,7 +565,7 @@ class Mastodon:
Returns a media dict. This contains the id that can be used in
status_post to attach the media file to a toot.
"""
if os.path.isfile(media_file) and mime_type == None:
if mime_type == None and os.path.isfile(media_file):
mime_type = mimetypes.guess_type(media_file)[0]
media_file = open(media_file, 'rb')