From 0265df854e0db07d79da735e2a9bf4aee86f7975 Mon Sep 17 00:00:00 2001 From: sebres Date: Sat, 23 Aug 2025 22:00:03 +0200 Subject: [PATCH] silence skipping tests output for python versions that basically can not have the modules --- fail2ban/tests/action_d/test_smtp.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fail2ban/tests/action_d/test_smtp.py b/fail2ban/tests/action_d/test_smtp.py index 6ad99978..a6904255 100644 --- a/fail2ban/tests/action_d/test_smtp.py +++ b/fail2ban/tests/action_d/test_smtp.py @@ -175,7 +175,8 @@ try: super(SMTPActionTest, self).tearDown() except ImportError as e: - print("I: Skipping smtp tests: %s" % e) + if tuple(sys.version_info) <= (3, 11): + print("I: Skipping smtp tests: %s" % e) try: @@ -309,4 +310,5 @@ try: super(AIOSMTPActionTest, self).tearDown() except ImportError as e: - print("I: Skipping SSL smtp tests: %s" % e) + if tuple(sys.version_info) >= (3, 10): + print("I: Skipping SSL smtp tests: %s" % e)