Skip to content
Snippets Groups Projects
Commit c52a850b authored by Matt Traudt's avatar Matt Traudt Committed by Matt Traudt
Browse files

Have config verify that at least one helper is enabled

parent 8e3914d3
Branches
Tags
No related merge requests found
......@@ -48,6 +48,7 @@ class HelperRelayList:
self.controller = c
else:
self.controller = controller
assert len(helpers) > 0
for helper in helpers:
assert isinstance(helper, HelperRelay)
self._socks_proxy = (conf['tor']['socks_host'],
......
......@@ -258,6 +258,9 @@ def _validate_helpers(conf):
assert valid
if section.getboolean(key):
addtional_helper_sections.append('{}.{}'.format(sec, key))
if len(addtional_helper_sections) < 1:
errors.append('Need more than 0 enabled helpers in [{}] section'
.format(sec))
fps = {
'relay': {},
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment