aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index c8dc6e4..a5c05b7 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1727,6 +1727,8 @@ class Mastodon:
1727 if mime_type is None and os.path.isfile(media_file): 1727 if mime_type is None and os.path.isfile(media_file):
1728 mime_type = guess_type(media_file) 1728 mime_type = guess_type(media_file)
1729 media_file = open(media_file, 'rb') 1729 media_file = open(media_file, 'rb')
1730 elif mime_type and os.path.isfile(media_file):
1731 media_file = open(media_file, 'rb')
1730 1732
1731 if mime_type is None: 1733 if mime_type is None:
1732 raise MastodonIllegalArgumentError('Could not determine mime type' 1734 raise MastodonIllegalArgumentError('Could not determine mime type'
Powered by cgit v1.2.3 (git 2.41.0)