Slightly better user-facing privacy error message here

This commit is contained in:
Jean-Paul Calderone 2020-12-11 11:22:39 -05:00
parent 9259264d27
commit efac902e57
2 changed files with 6 additions and 2 deletions

View File

@ -654,7 +654,10 @@ def create_default_connection_handlers(reactor, config, handlers):
if not reveal_ip:
if default_connection_handlers.get("tcp") == "tcp":
raise PrivacyError("tcp = tcp, must not be set to 'tcp'")
raise PrivacyError(
"Privacy requested with `reveal-IP-address = false` "
"but `tcp = tcp` conflicts with this.",
)
return default_connection_handlers

View File

@ -412,7 +412,8 @@ class Privacy(unittest.TestCase):
self.assertEqual(
str(ctx.exception),
"tcp = tcp, must be set to 'tor' or 'disabled'",
"Privacy requested with `reveal-IP-address = false` "
"but `tcp = tcp` conflicts with this.",
)
def test_connections_tcp_disabled(self):