[PATCH 07 of 10] tests: fix dummysmtpd argument check
Mads Kiilerich
mads at kiilerich.com
Wed Jun 28 00:06:52 UTC 2023
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1687790713 -7200
# Mon Jun 26 16:45:13 2023 +0200
# Branch stable
# Node ID 0fc04b7dda3c22b6eda5385e59be8307f883a88e
# Parent 22a8aa225c38766ddd29c51348dd4484b5e58f59
tests: fix dummysmtpd argument check
diff --git a/tests/dummysmtpd.py b/tests/dummysmtpd.py
--- a/tests/dummysmtpd.py
+++ b/tests/dummysmtpd.py
@@ -99,8 +99,8 @@ def main():
op.add_option('--logfile', metavar='FILE')
opts, args = op.parse_args()
- if opts.tls == 'smtps' and not opts.certificate:
- op.error('--certificate must be specified')
+ if (opts.tls == 'smtps') != bool(opts.certificate):
+ op.error('--certificate must be specified with --tls=smtps')
addr = (opts.address, opts.port)
More information about the Mercurial-devel
mailing list