aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/res.py
diff options
context:
space:
mode:
authorheretic <heretic@yandex-team.ru>2022-02-10 16:45:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:46 +0300
commit81eddc8c0b55990194e112b02d127b87d54164a9 (patch)
tree9142afc54d335ea52910662635b898e79e192e49 /build/plugins/res.py
parent397cbe258b9e064f49c4ca575279f02f39fef76e (diff)
downloadydb-81eddc8c0b55990194e112b02d127b87d54164a9.tar.gz
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/plugins/res.py')
-rw-r--r--build/plugins/res.py52
1 files changed, 26 insertions, 26 deletions
diff --git a/build/plugins/res.py b/build/plugins/res.py
index 8928cc99e8..a937caba81 100644
--- a/build/plugins/res.py
+++ b/build/plugins/res.py
@@ -1,31 +1,31 @@
from _common import iterpair, listid, pathid, rootrel_arc_src, tobuilddir, filter_out_by_keyword
-def split(lst, limit):
- # paths are specified with replaceable prefix
- # real length is unknown at the moment, that why we use root_lenght
- # as a rough estimation
- root_lenght = 200
- filepath = None
- lenght = 0
- bucket = []
-
- for item in lst:
- if filepath:
- lenght += root_lenght + len(filepath) + len(item)
- if lenght > limit and bucket:
- yield bucket
- bucket = []
- lenght = 0
-
- bucket.append(filepath)
- bucket.append(item)
- filepath = None
- else:
- filepath = item
-
- if bucket:
- yield bucket
+def split(lst, limit):
+ # paths are specified with replaceable prefix
+ # real length is unknown at the moment, that why we use root_lenght
+ # as a rough estimation
+ root_lenght = 200
+ filepath = None
+ lenght = 0
+ bucket = []
+
+ for item in lst:
+ if filepath:
+ lenght += root_lenght + len(filepath) + len(item)
+ if lenght > limit and bucket:
+ yield bucket
+ bucket = []
+ lenght = 0
+
+ bucket.append(filepath)
+ bucket.append(item)
+ filepath = None
+ else:
+ filepath = item
+
+ if bucket:
+ yield bucket
def remove_prefix(text, prefix):
@@ -34,7 +34,7 @@ def remove_prefix(text, prefix):
return text
-def onfat_resource(unit, *args):
+def onfat_resource(unit, *args):
unit.onpeerdir(['library/cpp/resource'])
# Since the maximum length of lpCommandLine string for CreateProcess is 8kb (windows) characters,