in tools/workspace_status.py [0:0]
def revision():
try:
return subprocess.check_output(CMD).strip().decode("utf-8")
except OSError as err:
print('could not invoke git: %s' % err, file=sys.stderr)
sys.exit(1)
except subprocess.CalledProcessError as err:
print('error using git: %s' % err, file=sys.stderr)
sys.exit(1)