diff options
author | Michael BrĂ¼ning <michael.bruning@digia.com> | 2014-01-09 15:30:47 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-13 11:23:28 +0100 |
commit | cdac331a0643e33ff2dc49d3fa3b2b0aecfe658c (patch) | |
tree | 89340f0e8120b701afd547412a8ec85f25781253 /tools/buildscripts/qtwebengine_utils.py | |
parent | 6c44e3bb4da24d048382a779b25331d57f052de0 (diff) | |
download | qtwebengine-cdac331a0643e33ff2dc49d3fa3b2b0aecfe658c.tar.gz |
Handle exception thrown by subprocess.check_output.
The || true syntax does not work on Windows.
Also, normalize the paths to the underlying OS style.
Change-Id: Ie13d2646fe239fccb9ab7b558a6c8d56b779b206
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'tools/buildscripts/qtwebengine_utils.py')
-rwxr-xr-x | tools/buildscripts/qtwebengine_utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/buildscripts/qtwebengine_utils.py b/tools/buildscripts/qtwebengine_utils.py index b68e2ff50..d8e65bfe7 100755 --- a/tools/buildscripts/qtwebengine_utils.py +++ b/tools/buildscripts/qtwebengine_utils.py @@ -51,13 +51,16 @@ def getChromiumSrcDir(): qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) os.chdir(qtwebengine_root) - chrome_src = subprocess.check_output("git config qtwebengine.chromiumsrcdir || true", shell=True).strip() + try: + chrome_src = subprocess.check_output("git config qtwebengine.chromiumsrcdir", shell=True).strip() + except subprocess.CalledProcessError: + chrome_src = None os.chdir(saved_cwd) if chrome_src: chrome_src = os.path.join(qtwebengine_root, chrome_src) if not chrome_src or not os.path.isdir(chrome_src): - chrome_src = os.path.join(qtwebengine_root, 'src/3rdparty/chromium') + chrome_src = os.path.normpath(os.path.join(qtwebengine_root, 'src/3rdparty/chromium')) print 'CHROMIUM_SRC_DIR not set, falling back to ' + chrome_src return chrome_src |