From 68450ae2616ad7cc650dc76c044bfb3f0e39a712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Tue, 6 Dec 2016 17:01:26 +0100 Subject: [PATCH] pyamqp's connection can not have .connect() --- coolamqp/backends/pyamqp.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coolamqp/backends/pyamqp.py b/coolamqp/backends/pyamqp.py index 8f50e2d..1f0cd26 100644 --- a/coolamqp/backends/pyamqp.py +++ b/coolamqp/backends/pyamqp.py @@ -32,8 +32,10 @@ class PyAMQPBackend(AMQPBackend): password=node.password, virtual_host=node.virtual_host, heartbeat=node.heartbeat or 0) - - self.connection.connect() #todo what does this raise? + try: + self.connection.connect() #todo what does this raise? + except AttributeError: + pass # this does not always have to exist self.channel = self.connection.channel() def shutdown(self): -- GitLab