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

redundant method

parent 76ae7db8
No related branches found
No related tags found
No related merge requests found
...@@ -261,26 +261,6 @@ class NodeDefinition(object): ...@@ -261,26 +261,6 @@ class NodeDefinition(object):
else: else:
raise ValueError(u'What did you exactly pass?') raise ValueError(u'What did you exactly pass?')
@staticmethod
def from_str(connstr, **kwargs):
"""
Return a NodeDefinition from an AMQP connection string.
It should look like:
:param connstr: a unicode
:param heartbeat: heartbeat to use
:return: NodeDefinition instance
:raise ValueError: invalid string
"""
return NodeDefinition(host=host, port=5672, user=user, password=passw, virtual_host=virtual_host,
heartbeat=kwargs.get('heartbeat', None))
def __str__(self): def __str__(self):
return six.text_type( return six.text_type(
b'amqp://%s:%s@%s/%s'.encode('utf8') % (self.host, self.port, self.user, self.virtual_host)) b'amqp://%s:%s@%s/%s'.encode('utf8') % (self.host, self.port, self.user, self.virtual_host))
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