浏览代码

[utils] Fix another old python 2.6 kwargs issue (Closes #5539)

Sergey M․ 10 年之前
父节点
当前提交
c86b61428b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      youtube_dl/utils.py

+ 2 - 1
youtube_dl/utils.py

@@ -37,6 +37,7 @@ from .compat import (
     compat_chr,
     compat_html_entities,
     compat_http_client,
+    compat_kwargs,
     compat_parse_qs,
     compat_socket_create_connection,
     compat_str,
@@ -114,7 +115,7 @@ def write_json_file(obj, fn):
             'encoding': 'utf-8',
         })
 
-    tf = tempfile.NamedTemporaryFile(**args)
+    tf = tempfile.NamedTemporaryFile(**compat_kwargs(args))
 
     try:
         with tf: