From 38ebdfac20969864d3126e52f059fda5c5d42a61 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 9 Sep 2016 17:56:24 -0700 Subject: [PATCH] create-node: reject --listen=tcp without --hostname= --- src/allmydata/scripts/create_node.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/allmydata/scripts/create_node.py b/src/allmydata/scripts/create_node.py index 1cd04584f..a68b1f94b 100644 --- a/src/allmydata/scripts/create_node.py +++ b/src/allmydata/scripts/create_node.py @@ -34,6 +34,8 @@ def validate_where_options(options): raise usage.UsageError("The --port option must be used with the --location option.") if (options['listen'] != "tcp") and options['hostname']: raise usage.UsageError("The listener type must be TCP to use --hostname option.") + if options['listen'] == "tcp" and not options['hostname']: + raise usage.UsageError("--listen=tcp requires --hostname=") if options['listen'] not in ["tcp", "tor", "i2p"]: raise usage.UsageError("The listener type must set to one of: tcp, tor, i2p.")