From bfcc6570b815bac37f10e3d2ca14c5fdf32075e6 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Thu, 16 Jan 2014 14:57:24 +0000 Subject: [PATCH] maybe_declare mus raise recoverable conncetion error, and not channel error --- kombu/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kombu/common.py b/kombu/common.py index 4c8f7b6d..64b33015 100644 --- a/kombu/common.py +++ b/kombu/common.py @@ -17,8 +17,9 @@ from contextlib import contextmanager from functools import partial from itertools import count +from amqp import RecoverableConnectionError + from .entity import Exchange, Queue -from .exceptions import ChannelError from .five import range from .log import get_logger from .messaging import Consumer as _Consumer @@ -93,7 +94,7 @@ def maybe_declare(entity, channel=None, retry=False, **retry_policy): def _maybe_declare(entity): channel = entity.channel if not channel.connection: - raise ChannelError('channel disconnected') + raise RecoverableConnectionError('channel disconnected') if entity.can_cache_declaration: declared = channel.connection.client.declared_entities ident = hash(entity)