Skip to content

Commit

Permalink
Fix custom transport overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
daevaorn authored and ask committed Apr 17, 2015
1 parent c3a6a6b commit aafea84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kombu/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ def __init__(self, hostname='localhost', userid=None,
transport = self.uri_prefix = params['transport']
else:
transport = transport or urlparse(hostname).scheme
if get_transport_cls(transport).can_parse_url:
# set the transport so that the default is not used.
params['transport'] = transport
else:
if not get_transport_cls(transport).can_parse_url:
# we must parse the URL
params.update(parse_url(hostname))

params['transport'] = transport

self._init_params(**params)

# fallback hosts
Expand Down

0 comments on commit aafea84

Please sign in to comment.