mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 08:12:15 -04:00
Use a different port for test mode.
This commit is contained in:
parent
233d1fb7f6
commit
e1e6135313
1 changed files with 5 additions and 2 deletions
|
|
@ -378,7 +378,10 @@ class StandaloneAuthenticator(common.Plugin):
|
|||
results_if_failure.append(False)
|
||||
if not self.tasks:
|
||||
raise ValueError("nothing for .perform() to do")
|
||||
if self.already_listening(challenges.DVSNI.PORT):
|
||||
port = challenges.DVSNI.PORT
|
||||
if self.config.test_mode:
|
||||
port = 5001
|
||||
if self.already_listening(port):
|
||||
# If we know a process is already listening on this port,
|
||||
# tell the user, and don't even attempt to bind it. (This
|
||||
# test is Linux-specific and won't indicate that the port
|
||||
|
|
@ -386,7 +389,7 @@ class StandaloneAuthenticator(common.Plugin):
|
|||
return results_if_failure
|
||||
# Try to do the authentication; note that this creates
|
||||
# the listener subprocess via os.fork()
|
||||
if self.start_listener(challenges.DVSNI.PORT, key):
|
||||
if self.start_listener(port, key):
|
||||
return results_if_success
|
||||
else:
|
||||
# TODO: This should probably raise a DVAuthError exception
|
||||
|
|
|
|||
Loading…
Reference in a new issue