aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2017-02-03 09:17:16 +0200
committerSimo Fält <simo.falt@qt.io>2017-03-10 05:32:08 +0000
commit24266f618b1e729491ce8daddbdcf83e95bd3b41 (patch)
treed085273f7ffa2943db99512b803f5bbe1850ef70
parentfec05b1816d43d44771fbb4cbd0a5321e47b4969 (diff)
Fix prepare_coin_sources.py on win
"run_process_output" tends to crash on win, so using standard subprocess.check_output instead. Change-Id: Ibb3cc200558175a25cb580ddc13e6c0e7fc918c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--prepare_coin_sources.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/prepare_coin_sources.py b/prepare_coin_sources.py
index 718f14f7d..8f71a52cb 100644
--- a/prepare_coin_sources.py
+++ b/prepare_coin_sources.py
@@ -41,8 +41,9 @@ from __future__ import print_function
import os
import sys
import shutil
+from subprocess import PIPE, Popen
from utils import option_value
-from utils import run_process_output, run_process
+from utils import run_process
git_server = "git://code.qt.io"
@@ -109,7 +110,9 @@ def prepare_sources():
#Make sure the branch exists, if not use dev
_branch = SUBMODULE_BRANCH
git_list_branch_cmd = ["git", "branch", "--list", _branch]
- if len(run_process_output(git_list_branch_cmd))==0:
+ shell = (sys.platform == "win32")
+ result = Popen(git_list_branch_cmd, stdout=PIPE, shell=shell)
+ if len(result.communicate()[0].split())==0:
print("Warning: Requested %s branch doesn't exist so we'll fall back to 'dev' branch instead"\
% SUBMODULE_BRANCH)
_branch = "dev"