diff --git a/coolamqp/objects.py b/coolamqp/objects.py index eb6731d1bc2d4658705a259d1299f58eef042c1c..a7608d4a39d32a82f753b4ba4bf640bb120a17dc 100644 --- a/coolamqp/objects.py +++ b/coolamqp/objects.py @@ -393,9 +393,8 @@ class NodeDefinition(object): self.host, self.user, self.password, self.virtual_host = args elif len(args) == 1 and isinstance(args[0], (six.text_type, six.binary_type)): - connstr = args[0].decode('utf8') if isinstance(args[0], - six.binary_type) else \ - args[0] + connstr = toutf8(args[0]) + # AMQP connstring if not connstr.startswith(u'amqp://'): raise ValueError(u'should begin with amqp://')