diff options
author | Lorenz Diener <[email protected]> | 2017-04-10 09:39:13 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2017-04-10 09:39:13 +0200 |
commit | 795354a835e6ef934d2764e69f947fb6a742a6be (patch) | |
tree | a6745736ca5dd20ea6fef52c13d6a15604499bf1 | |
parent | 853ae97dccc91988874ae229e9977c8f41a02e44 (diff) | |
parent | c45a1af5e1f95f80245cfc8def01dc786362956a (diff) | |
download | mastodon.py-795354a835e6ef934d2764e69f947fb6a742a6be.tar.gz |
Merge pull request #29 from edsu/media-post-value-error
media_post ValueError
-rw-r--r-- | mastodon/Mastodon.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 9967bdb..1ae888d 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -565,7 +565,7 @@ class Mastodon: | |||
565 | Returns a media dict. This contains the id that can be used in | 565 | Returns a media dict. This contains the id that can be used in |
566 | status_post to attach the media file to a toot. | 566 | status_post to attach the media file to a toot. |
567 | """ | 567 | """ |
568 | if os.path.isfile(media_file) and mime_type == None: | 568 | if mime_type == None and os.path.isfile(media_file): |
569 | mime_type = mimetypes.guess_type(media_file)[0] | 569 | mime_type = mimetypes.guess_type(media_file)[0] |
570 | media_file = open(media_file, 'rb') | 570 | media_file = open(media_file, 'rb') |
571 | 571 | ||