From 96715dcd2bb6b4a25d3ba2c2ff9461cc5db40ce4 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Fri, 10 Jul 2020 11:47:05 +0100 Subject: [PATCH] autopkgtest: Import amqplib when submitting test requests Commit b82f4fc63238e48a8b7c76f32576dee2cd57d403 moved the importing of amqplib to be done when required, but it missed a spot. --- britney2/policies/autopkgtest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 13fe64c..31db78d 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -997,6 +997,7 @@ class AutopkgtestPolicy(BasePolicy): params['submit-time'] = datetime.strftime(datetime.utcnow(), '%Y-%m-%d %H:%M:%S%z') if self.amqp_channel: + import amqplib.client_0_8 as amqp params = json.dumps(params) self.amqp_channel.basic_publish(amqp.Message(src + '\n' + params, delivery_mode=2), # persistent