From: Sergey M․ Date: Sun, 24 Apr 2016 18:03:12 +0000 (+0600) Subject: [utils] Allow None mimetypes in mimetype2ext X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=eb9ee194221e2fb0c260ead7573280fe06d875e8;p=youtube-dl [utils] Allow None mimetypes in mimetype2ext --- diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index f333e4712..7bcc85e2b 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1935,6 +1935,9 @@ def error_to_compat_str(err): def mimetype2ext(mt): + if mt is None: + return None + ext = { 'audio/mp4': 'm4a', }.get(mt)