Skip to content

Commit 9386c2b

Browse files
committed
🐛 Attempt to set up TLS if tls_certificate or tls_private_key are provided
1 parent c5528a2 commit 9386c2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apricot/apricot_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ def __init__(
9393
endpoint.listen(factory)
9494

9595
# Attach a listening endpoint
96-
if tls_port:
96+
if (tls_certificate or tls_private_key):
9797
if not tls_certificate:
98-
msg = "No TLS certificate provided. Please provide one with --tls-certificate or disable TLS by not providing the --tls-port argument."
98+
msg = "No TLS certificate provided. Please provide one with --tls-certificate or disable TLS."
9999
raise ValueError(msg)
100100
if not tls_private_key:
101-
msg = "No TLS private key provided. Please provide one with --tls-private-key or disable TLS by not providing the --tls-port argument."
101+
msg = "No TLS private key provided. Please provide one with --tls-private-key or disable TLS."
102102
raise ValueError(msg)
103103
if self.debug:
104104
log.msg("Attaching a listening endpoint (TLS).")

0 commit comments

Comments
 (0)