2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-24 23:48:24 +00:00

Fixed version string

This commit is contained in:
Achilles Rasquinha 2018-01-30 13:17:17 +05:30
parent 762b02c818
commit 0e6291f108

View File

@ -347,7 +347,9 @@ def check_cmd(cmd, cwd='.'):
def get_git_version():
'''returns git version from `git --version`
extracts version number from string `get version 1.9.1` etc'''
version = get_cmd_output("git --version").strip().split()[2]
version = get_cmd_output("git --version")
version = version.decode('utf-8')
version = version.strip().split()[2]
version = '.'.join(version.split('.')[0:2])
return float(version)