MCPcopy Create free account
hub / github.com/cztomczak/cefpython / exec_cmd

Function exec_cmd

tools/automate-git.py:247–265  ·  view source on GitHub ↗

Execute the specified command and return the result.

(cmd, path)

Source from the content-addressed store, hash-verified

245
246
247def exec_cmd(cmd, path):
248 """ Execute the specified command and return the result. """
249 out = ''
250 err = ''
251 sys.stdout.write("-------- Running \"%s\" in \"%s\"...\n" % (cmd, path))
252 parts = cmd.split()
253 try:
254 process = subprocess.Popen(
255 parts,
256 cwd=path,
257 stdout=subprocess.PIPE,
258 stderr=subprocess.PIPE,
259 shell=(sys.platform == 'win32'))
260 out, err = process.communicate()
261 except IOError, (errno, strerror):
262 raise
263 except:
264 raise
265 return {'out': out, 'err': err}
266
267
268def get_git_hash(path, branch):

Callers 8

get_git_hashFunction · 0.85
get_git_dateFunction · 0.85
get_git_urlFunction · 0.85
get_chromium_versionsFunction · 0.85
log_chromium_changesFunction · 0.85
check_pattern_matchesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected