mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-23 19:31:55 +00:00
autopkgtest: Import amqplib when submitting test requests
Commit b82f4fc63238e48a8b7c76f32576dee2cd57d403 moved the importing of amqplib to be done when required, but it missed a spot.
This commit is contained in:
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')
|
||||
|
||||
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…
x
Reference in New Issue
Block a user