浏览代码

[utils] Allow None mimetypes in mimetype2ext

Sergey M․ 9 年之前
父节点
当前提交
eb9ee19422
共有 1 个文件被更改,包括 3 次插入0 次删除
  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):
+    if mt is None:
+        return None
+
     ext = {
         'audio/mp4': 'm4a',
     }.get(mt)