]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[utils] get_exe_version: encode executable name (fixes #5647)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 8 May 2015 09:01:24 +0000 (11:01 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 8 May 2015 09:01:24 +0000 (11:01 +0200)
It failed in python 2.x when $PATH contains a directory with non-ascii characters.

youtube_dl/utils.py

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