[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/master] Validate new config options for reseting bw
commit 6a55ae5a4f3edb1af0710a253ad1d2b1883465f5
Author: juga0 <juga@xxxxxxxxxx>
Date: Tue Jun 19 19:38:38 2018 +0000
Validate new config options for reseting bw
---
sbws/util/config.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sbws/util/config.py b/sbws/util/config.py
index 1425dda..2ea9e94 100644
--- a/sbws/util/config.py
+++ b/sbws/util/config.py
@@ -137,10 +137,15 @@ def _validate_general(conf):
floats = {
'http_timeout': {'minimum': 0.0, 'maximum': None},
}
+ bools = {
+ 'reset_bw_ipv4_changes': {},
+ 'reset_bw_ipv6_changes': {},
+ }
all_valid_keys = list(ints.keys()) + list(floats.keys())
errors.extend(_validate_section_keys(conf, sec, all_valid_keys, err_tmpl))
errors.extend(_validate_section_ints(conf, sec, ints, err_tmpl))
errors.extend(_validate_section_floats(conf, sec, floats, err_tmpl))
+ errors.extend(_validate_section_bools(conf, sec, bools, err_tmpl))
return errors
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits