diff options
author | snowball <snowball@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 4d57126b1bae3cfd0f4f95c32d1a85ca684ee92c (patch) | |
tree | 9aa76172d0e8abdf7c78fce6ec639c5d7e62b459 /build/scripts/run_msvc_wine.py | |
parent | 249e91c445cb92462f9509d1ef2730b27629f43d (diff) | |
download | ydb-4d57126b1bae3cfd0f4f95c32d1a85ca684ee92c.tar.gz |
Restoring authorship annotation for <snowball@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/scripts/run_msvc_wine.py')
-rw-r--r-- | build/scripts/run_msvc_wine.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/build/scripts/run_msvc_wine.py b/build/scripts/run_msvc_wine.py index 439d1f8831..e68a381b01 100644 --- a/build/scripts/run_msvc_wine.py +++ b/build/scripts/run_msvc_wine.py @@ -53,7 +53,7 @@ def subst_path(l): def call_wine_cmd_once(wine, cmd, env, mode): - p = run_subprocess(wine + cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env, close_fds=True, shell=False) + p = run_subprocess(wine + cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env, close_fds=True, shell=False) output = find_cmd_out(cmd) error = None @@ -71,20 +71,20 @@ def call_wine_cmd_once(wine, cmd, env, mode): # print >>sys.stderr, cmd, env, wine - stdout_and_stderr, _ = p.communicate() + stdout_and_stderr, _ = p.communicate() - return_code = p.returncode - if not stdout_and_stderr: - if return_code != 0: + return_code = p.returncode + if not stdout_and_stderr: + if return_code != 0: raise Exception('wine did something strange') - return return_code - elif ' : fatal error ' in stdout_and_stderr: - return_code = 1 - elif ' : error ' in stdout_and_stderr: - return_code = 2 + return return_code + elif ' : fatal error ' in stdout_and_stderr: + return_code = 1 + elif ' : error ' in stdout_and_stderr: + return_code = 2 - lines = [x.strip() for x in stdout_and_stderr.split('\n')] + lines = [x.strip() for x in stdout_and_stderr.split('\n')] prefixes = [ 'Microsoft (R)', @@ -135,12 +135,12 @@ def call_wine_cmd_once(wine, cmd, env, mode): if good_line(l): yield subst_path(l.strip()) - stdout_and_stderr = '\n'.join(filter_lines()).strip() + stdout_and_stderr = '\n'.join(filter_lines()).strip() - if stdout_and_stderr: - print >>sys.stderr, stdout_and_stderr + if stdout_and_stderr: + print >>sys.stderr, stdout_and_stderr - return return_code + return return_code def prepare_vc(fr, to): @@ -471,7 +471,7 @@ def run_main(): } slave_cmd = [sys.executable, sys.argv[0], wine, 'slave', json.dumps(args)] - p = run_subprocess(slave_cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=False) + p = run_subprocess(slave_cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=False) out, _ = p.communicate() return p.wait(), out |