From b92249f2a0288240aeee874cf2024b9efa91be8e Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Tue, 10 Dec 2024 02:10:17 -0600 Subject: [PATCH] Catch BrokenPipeError in addition to ConnectionResetError when publishing a message to the AMQP queue --- britney2/policies/autopkgtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index c7549c8..92e7226 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -1177,7 +1177,7 @@ class AutopkgtestPolicy(BasePolicy): self.amqp_channel.basic_publish(amqp.Message(src + '\n' + params, delivery_mode=2), # persistent routing_key=qname) - except ConnectionResetError: + except (ConnectionResetError, BrokenPipeError): return False else: # for file-based submission, triggers are space separated