diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-02-10 17:53:52 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-02-10 17:53:52 +0300 |
commit | 5c64b97bb7e4034eff8833e4c367f61d34fcb4ee (patch) | |
tree | 7c5769528f2fcdaa5a718aa73e4aa64d50905269 /build/scripts/process_command_files.py | |
parent | 1b56f620ac98766b198121ca1b728e7e61efbb56 (diff) | |
download | ydb-5c64b97bb7e4034eff8833e4c367f61d34fcb4ee.tar.gz |
intermediate changes
ref:4635f4dd763168c3fa295f87727595c785b4d5a4
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 28accfc175e..e24bdf3e2b3 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))
|