autopkgtest: Import amqplib when submitting test requests

Commit b82f4fc632 moved the importing of
amqplib to be done when required, but it missed a spot.
wip/linux-policy
Iain Lane 5 years ago committed by Iain Lane
parent 3d09947296
commit 178831e5df

@ -996,6 +996,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

Loading…
Cancel
Save