# HG changeset patch # User Mads Kiilerich # Date 2023-06-26 14:45:13 # Node ID 8823e4d411ba8ee7d410af1d65224d57ff1a2d99 # Parent cfb6ca77e6bc03653b1e1bc0e8b50ac804389bd1 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)