Commit 811a2684 authored by anonym's avatar anonym
Browse files

tor-controlport-filter: fail instead of warn when obligatory rule keys are missing.

parent e732a712
......@@ -257,10 +257,10 @@ class FilteredControlPortProxyHandler(socketserver.StreamRequestHandler):
for key, expected_val in matchers:
if not key in filter_:
is_ok = False
log("Filter '{}' lacks obligatory key '{}': skipping"
raise RuntimeError(
"Filter '{}' lacks obligatory key '{}'"
.format(filter_['name'], key)
if not any(val for val in filter_[key] \
if expected_val == val or val == '*'):
is_ok = False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment