Reland "Add possibility to expand strings in the autoroller."
This is a reland of bfb6124a73af8c9fb806d9798c21aa28d36b125f Reland with no changes, the revert was just a test. Original change's description: > Add possibility to expand strings in the autoroller. > > Starting from crrev.com/c/2265498, the Chromium DEPS file has a new > function Str(), which seems to just expand to the string it wraps. > > This causes the following error: > > NameError: name 'Str' is not defined > > In //tools_webrtc/autoroller/roll_deps.py. > > This CL adds a way to expand the string. > > No-Try: True > Bug: None > Change-Id: I4cdb43410edeed72b393f200314c0ee7eea9cb2a > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178865 > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> > Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#31661} TBR=jleconte@webrtc.org No-Try: True Bug: None Change-Id: I616f7ef2ef68f9a9cb6c5e2ca332d860a750b239 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178900 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31677}
This commit is contained in:
parent
c1b271264a
commit
927ee49266
@ -97,6 +97,10 @@ class RollError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def StrExpansion():
|
||||
return lambda str_value: str_value
|
||||
|
||||
|
||||
def VarLookup(local_scope):
|
||||
return lambda var_name: local_scope['vars'][var_name]
|
||||
|
||||
@ -104,6 +108,7 @@ def VarLookup(local_scope):
|
||||
def ParseDepsDict(deps_content):
|
||||
local_scope = {}
|
||||
global_scope = {
|
||||
'Str': StrExpansion(),
|
||||
'Var': VarLookup(local_scope),
|
||||
'deps_os': {},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user