diff --git a/coolamqp/objects.py b/coolamqp/objects.py index e609700cdeba76cb4e1e50e1ec0a28719d34d63a..c7fd455f2c4f0dfcb671632a914104514b80cd41 100644 --- a/coolamqp/objects.py +++ b/coolamqp/objects.py @@ -179,9 +179,9 @@ class Queue(object): self.auto_delete = auto_delete self.exclusive = exclusive - self.anonymous = len(name) == 0 # if this queue is anonymous, it must be regenerated upon reconnect + self.anonymous = len(self.name) == 0 # if this queue is anonymous, it must be regenerated upon reconnect - self.consumer_tag = name if not self.anonymous else uuid.uuid4().hex.encode('utf8') # bytes, consumer tag to use in AMQP comms + self.consumer_tag = self.name if not self.anonymous else uuid.uuid4().hex.encode('utf8') # bytes, consumer tag to use in AMQP comms assert isinstance(self.name, six.binary_type) assert isinstance(self.consumer_tag, six.binary_type)