[devtools] github-merge get toplevel dir without extra whitespace

Fixes a bug in github merge when it runs the tests where the toplevel directory has an extra '\n' appended to the path string. Now it doesn't.
This commit is contained in:
Andrew C 2016-01-23 10:35:27 -05:00 committed by MarcoFalke
parent 0ae5a18069
commit 7d99dee286

View File

@ -165,7 +165,7 @@ def main():
# Run test command if configured.
if testcmd:
# Go up to the repository's root.
toplevel = subprocess.check_output([GIT,'rev-parse','--show-toplevel'])
toplevel = subprocess.check_output([GIT,'rev-parse','--show-toplevel']).strip()
os.chdir(toplevel)
if subprocess.call(testcmd,shell=True):
print("ERROR: Running %s failed." % testcmd,file=stderr)