[utils] Allow None mimetypes in mimetype2ext
authorSergey M․ <dstftw@gmail.com>
Sun, 24 Apr 2016 18:03:12 +0000 (00:03 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 24 Apr 2016 18:03:12 +0000 (00:03 +0600)
youtube_dl/utils.py

index f333e471275a69cbd158828c90f0ed1b5522582f..7bcc85e2b530cb2eadb714e100b56d8f4637b87d 100644 (file)
@@ -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)