summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kombu/connection.py6
-rw-r--r--kombu/tests/test_connection.py1
2 files changed, 3 insertions, 4 deletions
diff --git a/kombu/connection.py b/kombu/connection.py
index 291d680a..1d70988a 100644
--- a/kombu/connection.py
+++ b/kombu/connection.py
@@ -495,9 +495,9 @@ class Connection(object):
create_channel = self.channel
class Revival(object):
- __name__ = fun.__name__
- __module__ = fun.__module__
- __doc__ = fun.__doc__
+ __name__ = getattr(fun, '__name__', None)
+ __module__ = getattr(fun, '__module__', None)
+ __doc__ = getattr(fun, '__doc__', None)
def revive(self, channel):
channels[0] = channel
diff --git a/kombu/tests/test_connection.py b/kombu/tests/test_connection.py
index 6bd3303f..fbe47113 100644
--- a/kombu/tests/test_connection.py
+++ b/kombu/tests/test_connection.py
@@ -418,7 +418,6 @@ class test_Connection(Case):
def test_autoretry(self):
myfun = Mock()
- myfun.__name__ = 'test_autoretry'
self.conn.transport.connection_errors = (KeyError, )