linux: Fix create distribution for chromedriver

This commit is contained in:
Cheng Zhao 2015-04-08 20:08:27 +08:00
parent c3f8ef06b6
commit f5e6c62418
2 changed files with 22 additions and 9 deletions

View file

@ -162,7 +162,7 @@ def get_chromedriver_version():
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
chromedriver = os.path.join(SOURCE_ROOT, 'out', 'R', 'chromedriver')
output = subprocess.check_output([chromedriver, '-v']).strip()
return 'v' + output[13:]
return 'v' + output[13:output.rfind(' ')]
def parse_version(version):