From 1d4270cb00f5e48fadea701305d6d484dac144d1 Mon Sep 17 00:00:00 2001 From: JC Francois Date: Sun, 8 Sep 2019 19:11:35 +0200 Subject: [PATCH] Another iteration on fix for crash when mime_type is NoneType --- twoot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twoot.py b/twoot.py index eaf6833..f44f8de 100755 --- a/twoot.py +++ b/twoot.py @@ -316,7 +316,7 @@ def main(argv): # Fix to avoid media_post failing because mime_type is NoneType # "Can only concatenate str to str" - mime_type = media.headers.get('content-type') + mime_type = media.headers['content-type'] if type(mime_type) is None: mime_type = ""