summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kombu/transport/SQS.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/kombu/transport/SQS.py b/kombu/transport/SQS.py
index f9ee2c75..a17b13cd 100644
--- a/kombu/transport/SQS.py
+++ b/kombu/transport/SQS.py
@@ -25,6 +25,7 @@ from boto.sqs.message import Message
from kombu.transport import virtual
from kombu.utils import cached_property, uuid
+from kombu.utils.encoding import safe_str
# dots are replaced by dash, all other punctuation
@@ -153,7 +154,7 @@ class Channel(virtual.Channel):
def entity_name(self, name, table=CHARS_REPLACE_TABLE):
"""Format AMQP queue name into a legal SQS queue name."""
- return name.encode(errors="replace").translate(table)
+ return safe_str(name).translate(table)
def _new_queue(self, queue, **kwargs):
"""Ensures a queue exists in SQS."""