summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-03 11:07:05 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-03 11:07:05 +0200
commitca4aa52f635ba46caf8927591ad13cd4bcbb1fc7 (patch)
treecb9e6a9638f4b593a61790baff0f4acac7e733e8
parentebb1e79d46cbea5def1bcb7c54346e6e44e4c830 (diff)
dfatool: analytic model getter: Add arg support
-rwxr-xr-xlib/dfatool.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dfatool.py b/lib/dfatool.py
index 1802acf..8f2e9e6 100755
--- a/lib/dfatool.py
+++ b/lib/dfatool.py
@@ -1075,6 +1075,8 @@ class AnalyticModel:
}
def model_getter(name, key, **kwargs):
+ if 'arg' in kwargs and 'param' in kwargs:
+ kwargs['param'].extend(map(soft_cast_int, kwargs['arg']))
if key in param_model[name]:
param_list = kwargs['param']
param_function = param_model[name][key]['function']
@@ -1450,6 +1452,8 @@ class PTAModel:
}
def model_getter(name, key, **kwargs):
+ if 'arg' in kwargs and 'param' in kwargs:
+ kwargs['param'].extend(map(soft_cast_int, kwargs['arg']))
if key in param_model[name]:
param_list = kwargs['param']
param_function = param_model[name][key]['function']