aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 0d1750f..7615d82 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -3672,8 +3672,8 @@ class MastodonMalformedEventError(MastodonError):
3672 3672
3673def guess_type(media_file): 3673def guess_type(media_file):
3674 mime_type = None 3674 mime_type = None
3675 if magic: 3675 try:
3676 mime_type = magic.from_file(media_file, mime=True) 3676 mime_type = magic.from_file(media_file, mime=True)
3677 else: 3677 except AttributeError:
3678 mime_type = mimetypes.guess_type(media_file)[0] 3678 mime_type = mimetypes.guess_type(media_file)[0]
3679 return mime_type 3679 return mime_type
Powered by cgit v1.2.3 (git 2.41.0)