commit b2c60d0d6d4a37a75a864e8127e8761835b3f41a Author: juga0 juga@riseup.net Date: Wed Jun 20 07:53:19 2018 +0000
Return trimmed results only when arg is True --- sbws/lib/resultdump.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sbws/lib/resultdump.py b/sbws/lib/resultdump.py index 31a8926..aab27e7 100644 --- a/sbws/lib/resultdump.py +++ b/sbws/lib/resultdump.py @@ -96,7 +96,6 @@ def trim_results_ip_changed(result_dict, on_changed_ipv4=False, :returns: a new results dictionary """ assert isinstance(result_dict, dict) - assert on_changed_ipv4 is True or on_changed_ipv6 is True new_results_dict = {} if on_changed_ipv4 is True: for fp in result_dict.keys(): @@ -115,10 +114,11 @@ def trim_results_ip_changed(result_dict, on_changed_ipv4=False, new_results_dict[fp] = last_ip_results else: new_results_dict[fp] = results + return new_results_dict if on_changed_ipv6 is True: log.warn("Reseting bandwidth results when IPv6 changes," " is not yet implemented.") - return new_results_dict + return result_dict
def load_recent_results_in_datadir(fresh_days, datadir, success_only=False,
tor-commits@lists.torproject.org