From eb9ee194221e2fb0c260ead7573280fe06d875e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Mon, 25 Apr 2016 00:03:12 +0600 Subject: [PATCH] [utils] Allow None mimetypes in mimetype2ext --- youtube_dl/utils.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.40.0