diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index e6d8268..7f0f0fd 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -1722,6 +1722,8 @@ class Mastodon: | |||
1722 | if mime_type is None and os.path.isfile(media_file): | 1722 | if mime_type is None and os.path.isfile(media_file): |
1723 | mime_type = mimetypes.guess_type(media_file)[0] | 1723 | mime_type = mimetypes.guess_type(media_file)[0] |
1724 | media_file = open(media_file, 'rb') | 1724 | media_file = open(media_file, 'rb') |
1725 | elif mime_type and os.path.isfile(media_file): | ||
1726 | media_file = open(media_file, 'rb') | ||
1725 | 1727 | ||
1726 | if mime_type is None: | 1728 | if mime_type is None: |
1727 | raise MastodonIllegalArgumentError('Could not determine mime type' | 1729 | raise MastodonIllegalArgumentError('Could not determine mime type' |