mirror of
https://github.com/mpv-player/mpv
synced 2025-02-25 01:37:21 +00:00
build: version string as native str type for each Python version
Should resolve the "mpv b'...'" issue on Python 3 without breaking things on Python 2. Also, remove redundant wait for process.
This commit is contained in:
parent
f193d25844
commit
a7293b92f4
@ -4,9 +4,11 @@ def __get_version__(ctx):
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
cwd=ctx.srcnode.abspath())
|
||||
process.wait()
|
||||
(version, err) = process.communicate()
|
||||
return version.strip().decode('utf-8').encode('ascii', 'ignore')
|
||||
version = version.strip()
|
||||
if not isinstance(version, str):
|
||||
version = version.decode('utf-8')
|
||||
return version
|
||||
|
||||
def __get_build_date__():
|
||||
import time
|
||||
|
Loading…
Reference in New Issue
Block a user