diff options
author | somov <somov@yandex-team.ru> | 2022-02-10 16:45:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:49 +0300 |
commit | 7489e4682331202b9c7d863c0898eb83d7b12c2b (patch) | |
tree | 9142afc54d335ea52910662635b898e79e192e49 /build/scripts/run_msvc_wine.py | |
parent | a5950576e397b1909261050b8c7da16db58f10b1 (diff) | |
download | ydb-7489e4682331202b9c7d863c0898eb83d7b12c2b.tar.gz |
Restoring authorship annotation for <somov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/scripts/run_msvc_wine.py')
-rw-r--r-- | build/scripts/run_msvc_wine.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/build/scripts/run_msvc_wine.py b/build/scripts/run_msvc_wine.py index 4779a868cd0..439d1f88316 100644 --- a/build/scripts/run_msvc_wine.py +++ b/build/scripts/run_msvc_wine.py @@ -6,7 +6,7 @@ import signal import time import json import argparse -import errno +import errno import process_command_files as pcf import process_whole_archive_option as pwa @@ -55,20 +55,20 @@ 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) - output = find_cmd_out(cmd) - error = None - if output is not None and os.path.exists(output): - try: - os.remove(output) - except OSError as e: - if e.errno != errno.ENOENT: - error = e - except Exception as e: - error = e - - if error is not None: - print >> sys.stderr, 'Output {} already exists and we have failed to remove it: {}'.format(output, error) - + output = find_cmd_out(cmd) + error = None + if output is not None and os.path.exists(output): + try: + os.remove(output) + except OSError as e: + if e.errno != errno.ENOENT: + error = e + except Exception as e: + error = e + + if error is not None: + print >> sys.stderr, 'Output {} already exists and we have failed to remove it: {}'.format(output, error) + # print >>sys.stderr, cmd, env, wine stdout_and_stderr, _ = p.communicate() @@ -360,7 +360,7 @@ def make_full_path_arg(arg, bld_root, short_root): return arg def fix_path(p): - topdirs = ['/%s/' % d for d in os.listdir('/')] + topdirs = ['/%s/' % d for d in os.listdir('/')] def abs_path_start(path, pos): if pos < 0: return False @@ -482,7 +482,7 @@ def run_main(): log = colorize(log) print >>sys.stderr, log - tout = 200 + tout = 200 while True: rc, out = run_process(0, tout) @@ -525,12 +525,12 @@ def run_main(): def main(): - prefix_suffix = os.environ.pop('WINEPREFIX_SUFFIX', None) - if prefix_suffix is not None: - prefix = os.environ.pop('WINEPREFIX', None) - if prefix is not None: - os.environ['WINEPREFIX'] = os.path.join(prefix, prefix_suffix) - + prefix_suffix = os.environ.pop('WINEPREFIX_SUFFIX', None) + if prefix_suffix is not None: + prefix = os.environ.pop('WINEPREFIX', None) + if prefix is not None: + os.environ['WINEPREFIX'] = os.path.join(prefix, prefix_suffix) + # just in case signal.alarm(2000) |