aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorsnermolaev <snermolaev@yandex-team.com>2023-09-19 07:23:09 +0300
committersnermolaev <snermolaev@yandex-team.com>2023-09-19 07:41:25 +0300
commit11536ca6ed95f3aca890e6ff4ff3774024d1a876 (patch)
treee82b4a222edc8e90cb7dff2d50c3a8b9c03440bf /build
parentae87be2b19d1d4e6a5c7bad6650381690b5dfe9d (diff)
downloadydb-11536ca6ed95f3aca890e6ff4ff3774024d1a876.tar.gz
update get_appended_values
Diffstat (limited to 'build')
-rw-r--r--build/plugins/gobuild.py9
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):