1
0
Эх сурвалжийг харах

[utils] Allow None mimetypes in mimetype2ext

Sergey M․ 9 жил өмнө
parent
commit
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)