瀏覽代碼

[utils] get_exe_version: encode executable name (fixes #5647)

It failed in python 2.x when $PATH contains a directory with non-ascii characters.
Jaime Marquínez Ferrándiz 10 年之前
父節點
當前提交
541168039d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/utils.py

+ 1 - 1
youtube_dl/utils.py

@@ -1380,7 +1380,7 @@ def get_exe_version(exe, args=['--version'],
     or False if the executable is not present """
     or False if the executable is not present """
     try:
     try:
         out, _ = subprocess.Popen(
         out, _ = subprocess.Popen(
-            [exe] + args,
+            [encodeArgument(exe)] + args,
             stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()
             stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()
     except OSError:
     except OSError:
         return False
         return False