diff options
author | tekireeva <tekireeva@yandex-team.ru> | 2022-02-10 16:51:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:51:38 +0300 |
commit | 569c3cefb9e9785ef25d8a067c01ea66ffa8deef (patch) | |
tree | ab7fbbf3253d4c0e2793218f09378908beb025fb /build/scripts/process_command_files.py | |
parent | e9d6dd2e511aaaec9e6182b7ae9327dce82a051d (diff) | |
download | ydb-569c3cefb9e9785ef25d8a067c01ea66ffa8deef.tar.gz |
Restoring authorship annotation for <tekireeva@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/scripts/process_command_files.py')
-rw-r--r-- | build/scripts/process_command_files.py | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/build/scripts/process_command_files.py b/build/scripts/process_command_files.py index 82626187ded..28accfc175e 100644 --- a/build/scripts/process_command_files.py +++ b/build/scripts/process_command_files.py @@ -1,33 +1,33 @@ -import sys - - -def is_cmdfile_arg(arg): - return arg.startswith('@') - -def cmdfile_path(arg): - return arg[1:] - -def read_from_command_file(arg): - with open(arg) as afile: - return afile.read().splitlines() - -def skip_markers(args): - res = [] - for arg in args: - if arg == '--ya-start-command-file' or arg == '--ya-end-command-file': - continue - res.append(arg) - return res - -def iter_args(args): - for arg in args: - if not is_cmdfile_arg(arg): - if arg == '--ya-start-command-file' or arg == '--ya-end-command-file': - continue - yield arg - else: - for cmdfile_arg in read_from_command_file(cmdfile_path(arg)): - yield cmdfile_arg - -def get_args(args): - return list(iter_args(args)) +import sys + + +def is_cmdfile_arg(arg): + return arg.startswith('@') + +def cmdfile_path(arg): + return arg[1:] + +def read_from_command_file(arg): + with open(arg) as afile: + return afile.read().splitlines() + +def skip_markers(args): + res = [] + for arg in args: + if arg == '--ya-start-command-file' or arg == '--ya-end-command-file': + continue + res.append(arg) + return res + +def iter_args(args): + for arg in args: + if not is_cmdfile_arg(arg): + if arg == '--ya-start-command-file' or arg == '--ya-end-command-file': + continue + yield arg + else: + for cmdfile_arg in read_from_command_file(cmdfile_path(arg)): + yield cmdfile_arg + +def get_args(args): + return list(iter_args(args)) |