mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update scripts to support git checkouts of CEF and/or Chromium.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1664 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
21
tools/exec_util.py
Normal file
21
tools/exec_util.py
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
|
||||
# reserved. Use of this source code is governed by a BSD-style license that
|
||||
# can be found in the LICENSE file
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
import sys
|
||||
|
||||
def exec_cmd(cmd, path):
|
||||
""" Execute the specified command and return the result. """
|
||||
out = ''
|
||||
err = ''
|
||||
parts = cmd.split()
|
||||
try:
|
||||
process = Popen(cmd, cwd=path, stdout=PIPE, stderr=PIPE,
|
||||
shell=(sys.platform == 'win32'))
|
||||
out, err = process.communicate()
|
||||
except IOError, (errno, strerror):
|
||||
raise
|
||||
except:
|
||||
raise
|
||||
return {'out': out, 'err': err}
|
Reference in New Issue
Block a user