From 53dad5724103db5b6412343c65140f1121254c57 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Wed, 4 Jan 2012 16:17:33 -0800 Subject: [PATCH] Remove small unneeded code from impl_kombu If a publish fails, we reconnect to rabbit. In this case, we try to declare the publisher exchange... and loop around and do the same thing again after grabbing a new class instance. This removes the extra code. Change-Id: I99089ccfb93bb860d5221c267f35a16c1faf3707 --- nova/rpc/impl_kombu.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/nova/rpc/impl_kombu.py b/nova/rpc/impl_kombu.py index 5f47737d..82eb651d 100644 --- a/nova/rpc/impl_kombu.py +++ b/nova/rpc/impl_kombu.py @@ -449,7 +449,6 @@ class Connection(object): def publisher_send(self, cls, topic, msg, **kwargs): """Send to a publisher based on the publisher class""" while True: - publisher = None try: publisher = cls(self.channel, topic, **kwargs) publisher.send(msg) @@ -458,8 +457,6 @@ class Connection(object): LOG.exception(_('Failed to publish message %s' % str(e))) try: self.reconnect() - if publisher: - publisher.reconnect(self.channel) except self.connection.connection_errors, e: pass