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