gn2bp: add update value arg support

Allows for passing in a function that will be applied to transform the
arg value.

Test: none
Change-Id: Iff5c5ab62f8f93d15ff0fb36d740bb326b08655e
This commit is contained in:
Patrick Rohr
2022-11-30 15:12:57 -08:00
parent 2cad933ab6
commit 1bedf6ca4e

View File

@@ -656,6 +656,9 @@ class BaseActionSanitizer():
i = self.target.args.index(arg)
self.target.args[i + 1] = value
def _update_value_arg(self, arg, func):
self._set_value_arg(arg, func(self._get_value_arg(arg)))
def _set_arg_at(self, position, value):
self.target.args[position] = value