Last try before I revert all this.

This commit is contained in:
Asher Baker 2015-11-05 10:54:35 +00:00
parent ed5771a861
commit e8eb9970a6

View File

@ -59,7 +59,7 @@ for line in lines:
proc = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=devnull, cwd=path, universal_newlines=True) proc = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=devnull, cwd=path, universal_newlines=True)
procout, procerr = proc.communicate() procout, procerr = proc.communicate()
if proc.returncode: if proc.returncode:
raise RuntimeError('Failed to execute \'' + ' '.join(argv) + '\' = ' + proc.returncode) raise RuntimeError('Failed to execute \'' + ' '.join(argv) + '\' = ' + str(proc.returncode))
return procout.strip() return procout.strip()
try: try:
@ -71,7 +71,8 @@ for line in lines:
url = runCommand(['git', 'ls-remote', '--get-url', 'origin']) url = runCommand(['git', 'ls-remote', '--get-url', 'origin'])
rev = runCommand(['git', 'log', '--pretty=format:%H', '-n', '1']) rev = runCommand(['git', 'log', '--pretty=format:%H', '-n', '1'])
except (OSError, RuntimeError): except (OSError, RuntimeError) as e:
sys.stderr.write(str(e) + '\n')
continue continue
roots[root] = (url, rev) roots[root] = (url, rev)