1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 01:08:10 +00:00

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

It failed in python 2.x when $PATH contains a directory with non-ascii characters.
This commit is contained in:
Jaime Marquínez Ferrándiz 2015-05-08 11:01:24 +02:00
parent 7ef00afe9d
commit 541168039d

View file

@ -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