diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-26 10:14:59 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-26 11:00:18 +0800 |
commit | 1403c94ef114912c5eef3700e123b137b030c2c7 (patch) | |
tree | 80b42128c74d9a06b3c9907bd4e1cab0ebb7647d /qtip/util | |
parent | 0c10841189cee0eab2dcd0a18ab946bb3ae617a0 (diff) |
Add support for result aggregation
Change-Id: I678b765f3f430cb6a5d130d94960273b8eea85e7
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'qtip/util')
-rw-r--r-- | qtip/util/export_to.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qtip/util/export_to.py b/qtip/util/export_to.py index 17adae7c..4d054c66 100644 --- a/qtip/util/export_to.py +++ b/qtip/util/export_to.py @@ -11,8 +11,9 @@ import json def export_to_file(func): - def func_wrapper(spec, metrics, dest=None): - content = func(spec, metrics) + def func_wrapper(*args, **kwargs): + dest = kwargs.pop('dest', None) + content = func(*args, **kwargs) if dest is not None: with open(dest, 'w+') as f: f.write(json.dumps(content, indent=2)) |