浏览代码

[utils] Use compat_shlex_quote in shell_quote

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

+ 1 - 2
youtube_dl/utils.py

@@ -22,7 +22,6 @@ import locale
 import math
 import math
 import operator
 import operator
 import os
 import os
-import pipes
 import platform
 import platform
 import random
 import random
 import re
 import re
@@ -1535,7 +1534,7 @@ def shell_quote(args):
         if isinstance(a, bytes):
         if isinstance(a, bytes):
             # We may get a filename encoded with 'encodeFilename'
             # We may get a filename encoded with 'encodeFilename'
             a = a.decode(encoding)
             a = a.decode(encoding)
-        quoted_args.append(pipes.quote(a))
+        quoted_args.append(compat_shlex_quote(a))
     return ' '.join(quoted_args)
     return ' '.join(quoted_args)