mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-13 13:53:07 +00:00
move validation code to parser-helper
This commit is contained in:
parent
2517535d2b
commit
955d7abfa3
@ -557,6 +557,10 @@ def _tub_portlocation(config):
|
||||
else:
|
||||
tubport = _convert_tub_port(cfg_tubport)
|
||||
|
||||
for port in tubport.split(","):
|
||||
if port in ("0", "tcp:0"):
|
||||
raise ValueError("tub.port cannot be 0: you must choose")
|
||||
|
||||
if cfg_location is None:
|
||||
cfg_location = "AUTO"
|
||||
|
||||
@ -607,8 +611,6 @@ def create_main_tub(config, tub_options,
|
||||
if portlocation:
|
||||
tubport, location = portlocation
|
||||
for port in tubport.split(","):
|
||||
if port in ("0", "tcp:0"):
|
||||
raise ValueError("tub.port cannot be 0: you must choose")
|
||||
if port == "listen:i2p":
|
||||
# the I2P provider will read its section of tahoe.cfg and
|
||||
# return either a fully-formed Endpoint, or a descriptor
|
||||
|
Loading…
x
Reference in New Issue
Block a user