diff options
-rw-r--r-- | mastodon/Mastodon.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index a2035c9..c8dc6e4 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -1496,7 +1496,7 @@ class Mastodon: | |||
1496 | # Load avatar, if specified | 1496 | # Load avatar, if specified |
1497 | if not avatar is None: | 1497 | if not avatar is None: |
1498 | if avatar_mime_type is None and os.path.isfile(avatar): | 1498 | if avatar_mime_type is None and os.path.isfile(avatar): |
1499 | avatar_mime_type = mimetypes.guess_type(avatar)[0] | 1499 | avatar_mime_type = guess_type(avatar) |
1500 | avatar = open(avatar, 'rb') | 1500 | avatar = open(avatar, 'rb') |
1501 | 1501 | ||
1502 | if avatar_mime_type is None: | 1502 | if avatar_mime_type is None: |
@@ -1505,7 +1505,7 @@ class Mastodon: | |||
1505 | # Load header, if specified | 1505 | # Load header, if specified |
1506 | if not header is None: | 1506 | if not header is None: |
1507 | if header_mime_type is None and os.path.isfile(header): | 1507 | if header_mime_type is None and os.path.isfile(header): |
1508 | header_mime_type = mimetypes.guess_type(header)[0] | 1508 | header_mime_type = guess_type(header) |
1509 | header = open(header, 'rb') | 1509 | header = open(header, 'rb') |
1510 | 1510 | ||
1511 | if header_mime_type is None: | 1511 | if header_mime_type is None: |
@@ -1725,7 +1725,7 @@ class Mastodon: | |||
1725 | status_post to attach the media file to a toot. | 1725 | status_post to attach the media file to a toot. |
1726 | """ | 1726 | """ |
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 = mimetypes.guess_type(media_file)[0] | 1728 | mime_type = guess_type(media_file) |
1729 | media_file = open(media_file, 'rb') | 1729 | media_file = open(media_file, 'rb') |
1730 | 1730 | ||
1731 | if mime_type is None: | 1731 | if mime_type is None: |