Catch BrokenPipeError in addition to ConnectionResetError when publishing a message to the AMQP queue

master
Simon Quigley 1 month ago
parent b21879fcff
commit b92249f2a0

@ -1177,7 +1177,7 @@ class AutopkgtestPolicy(BasePolicy):
self.amqp_channel.basic_publish(amqp.Message(src + '\n' + params, self.amqp_channel.basic_publish(amqp.Message(src + '\n' + params,
delivery_mode=2), # persistent delivery_mode=2), # persistent
routing_key=qname) routing_key=qname)
except ConnectionResetError: except (ConnectionResetError, BrokenPipeError):
return False return False
else: else:
# for file-based submission, triggers are space separated # for file-based submission, triggers are space separated

Loading…
Cancel
Save