From a28e7a27fbeeb296fd1a16d5dbebd26dfdcdfa6d Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Tue, 8 Jan 2019 17:25:03 +0200 Subject: [PATCH] Remove unused private method. --- kombu/connection.py | 4 ---- t/unit/test_connection.py | 6 ------ 2 files changed, 10 deletions(-) diff --git a/kombu/connection.py b/kombu/connection.py index 19815809..d74cb80d 100644 --- a/kombu/connection.py +++ b/kombu/connection.py @@ -452,10 +452,6 @@ class Connection(object): self.maybe_close_channel(self._default_channel) self._default_channel = None - def _default_ensure_callback(self, exc, interval): - logger.error("Ensure: Operation error: %r. Retry in %ss", - exc, interval, exc_info=True) - def ensure(self, obj, fun, errback=None, max_retries=None, interval_start=1, interval_step=1, interval_max=1, on_revive=None): diff --git a/t/unit/test_connection.py b/t/unit/test_connection.py index 87a71aa7..a2489bc3 100644 --- a/t/unit/test_connection.py +++ b/t/unit/test_connection.py @@ -218,12 +218,6 @@ class test_Connection: c = Connection('pyamqp+sqlite://some_host') assert c.as_uri().startswith('pyamqp+') - def test_default_ensure_callback(self): - with patch('kombu.connection.logger') as logger: - c = Connection(transport=Mock) - c._default_ensure_callback(KeyError(), 3) - logger.error.assert_called() - def test_ensure_connection_on_error(self): c = Connection('amqp://A;amqp://B') with patch('kombu.connection.retry_over_time') as rot: