diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /build/plugins/_custom_command.py | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'build/plugins/_custom_command.py')
-rw-r--r-- | build/plugins/_custom_command.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/build/plugins/_custom_command.py b/build/plugins/_custom_command.py index 5e554ee97f..9692214b22 100644 --- a/build/plugins/_custom_command.py +++ b/build/plugins/_custom_command.py @@ -1,7 +1,7 @@ import subprocess import sys -import os - +import os + import _common as common @@ -25,29 +25,29 @@ class CustomCommand(object): def call(self, args, **kwargs): cwd = self._get_call_specs('cwd', kwargs) stdout_path = self._get_call_specs('stdout', kwargs) - + resolved_args = [] - + for arg in args: - resolved_args.append(self.resolve_path(arg)) + resolved_args.append(self.resolve_path(arg)) if stdout_path: stdout = open(stdout_path, 'wb') else: stdout = None - env = os.environ.copy() - env['ASAN_OPTIONS'] = 'detect_leaks=0' + env = os.environ.copy() + env['ASAN_OPTIONS'] = 'detect_leaks=0' + + rc = subprocess.call(resolved_args, cwd=cwd, stdout=stdout, env=env) - rc = subprocess.call(resolved_args, cwd=cwd, stdout=stdout, env=env) - if stdout: stdout.close() if rc: sys.exit(rc) - def resolve_path(self, path): - return common.resolve_to_abs_path(path, self._source_root, self._build_root) + def resolve_path(self, path): + return common.resolve_to_abs_path(path, self._source_root, self._build_root) def _get_call_specs(self, name, kwargs): if isinstance(kwargs, dict): @@ -55,7 +55,7 @@ class CustomCommand(object): if param: return self.resolve_path(param) return None - + def addrule(*unused): pass |