diff options
author | snermolaev <snermolaev@yandex-team.com> | 2023-09-19 07:23:09 +0300 |
---|---|---|
committer | snermolaev <snermolaev@yandex-team.com> | 2023-09-19 07:41:25 +0300 |
commit | 11536ca6ed95f3aca890e6ff4ff3774024d1a876 (patch) | |
tree | e82b4a222edc8e90cb7dff2d50c3a8b9c03440bf /build | |
parent | ae87be2b19d1d4e6a5c7bad6650381690b5dfe9d (diff) | |
download | ydb-11536ca6ed95f3aca890e6ff4ff3774024d1a876.tar.gz |
update get_appended_values
Diffstat (limited to 'build')
-rw-r--r-- | build/plugins/gobuild.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build/plugins/gobuild.py b/build/plugins/gobuild.py index 6bc25182d1..3946d7214c 100644 --- a/build/plugins/gobuild.py +++ b/build/plugins/gobuild.py @@ -42,12 +42,13 @@ def get_import_path(unit): def get_appended_values(unit, key): - value = [] + values = [] raw_value = unit.get(key) if raw_value: - value = list(filter(lambda x: len(x) > 0, raw_value.split(' '))) - assert len(value) == 0 or value[0] == '$' + key - return value[1:] if len(value) > 0 else value + values = [x for x in raw_value.split(' ') if x] + if len(values) > 0 and values[0] == '$' + key: + values.pop(0) + return values def compare_versions(version1, version2): |