Skip to content
Snippets Groups Projects
Commit ea13e470 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

shorter code

parent f4b2373e
No related branches found
No related tags found
No related merge requests found
Pipeline #63894 canceled with stages
in 1 minute and 9 seconds
...@@ -393,9 +393,8 @@ class NodeDefinition(object): ...@@ -393,9 +393,8 @@ class NodeDefinition(object):
self.host, self.user, self.password, self.virtual_host = args self.host, self.user, self.password, self.virtual_host = args
elif len(args) == 1 and isinstance(args[0], elif len(args) == 1 and isinstance(args[0],
(six.text_type, six.binary_type)): (six.text_type, six.binary_type)):
connstr = args[0].decode('utf8') if isinstance(args[0], connstr = toutf8(args[0])
six.binary_type) else \
args[0]
# AMQP connstring # AMQP connstring
if not connstr.startswith(u'amqp://'): if not connstr.startswith(u'amqp://'):
raise ValueError(u'should begin with amqp://') raise ValueError(u'should begin with amqp://')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment