Browse Source

[utils] Allow None mimetypes in mimetype2ext

Sergey M․ 9 years ago
parent
commit
eb9ee19422
1 changed files with 3 additions and 0 deletions
  1. 3 0
      youtube_dl/utils.py

+ 3 - 0
youtube_dl/utils.py

@@ -1935,6 +1935,9 @@ def error_to_compat_str(err):
 
 
 
 
 def mimetype2ext(mt):
 def mimetype2ext(mt):
+    if mt is None:
+        return None
+
     ext = {
     ext = {
         'audio/mp4': 'm4a',
         'audio/mp4': 'm4a',
     }.get(mt)
     }.get(mt)