autopkgtest: Import amqplib when submitting test requests

Commit b82f4fc632 moved the importing of
amqplib to be done when required, but it missed a spot.
ubuntu/dry-run
Iain Lane 5 years ago committed by Iain Lane
parent 7d6d4debdf
commit 96715dcd2b

@ -997,6 +997,7 @@ class AutopkgtestPolicy(BasePolicy):
params['submit-time'] = datetime.strftime(datetime.utcnow(), '%Y-%m-%d %H:%M:%S%z') params['submit-time'] = datetime.strftime(datetime.utcnow(), '%Y-%m-%d %H:%M:%S%z')
if self.amqp_channel: if self.amqp_channel:
import amqplib.client_0_8 as amqp
params = json.dumps(params) params = json.dumps(params)
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

Loading…
Cancel
Save