From 1403c94ef114912c5eef3700e123b137b030c2c7 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Wed, 26 Apr 2017 10:14:59 +0800 Subject: Add support for result aggregation Change-Id: I678b765f3f430cb6a5d130d94960273b8eea85e7 Signed-off-by: Yujun Zhang --- qtip/util/export_to.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qtip/util') 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)) -- cgit 1.2.3-korg