Skip to content
Snippets Groups Projects
Commit be9cb08c authored by Grzegorz Śliwiński's avatar Grzegorz Śliwiński
Browse files

allow for username and password to be default again - fixes #96

parent 5b6d55d5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3,6 +3,12 @@ The Connection class negotiates and manages the connection state.
 
"""
import logging
# pylint: disable=import-error
try:
from urllib import parse as urlparse
except ImportError:
import urlparse
try:
import ssl
except ImportError:
Loading
Loading
@@ -512,8 +518,8 @@ class Connection(base.StatefulObject):
'host': parsed.hostname,
'port': parsed.port or scheme_port,
'virtual_host': utils.unquote(vhost),
'username': parsed.username or self.GUEST,
'password': parsed.password or self.GUEST,
'username': urlparse.unquote(parsed.username or self.GUEST),
'password': urlparse.unquote(parsed.password or self.GUEST),
'timeout': self._qargs_int('timeout', qargs, self.DEFAULT_TIMEOUT),
'heartbeat': self._qargs_int('heartbeat', qargs,
self.DEFAULT_HEARTBEAT_INTERVAL),
Loading
Loading
Loading
Loading
@@ -78,8 +78,8 @@ def urlparse(url):
parsed = _urlparse.urlparse(value)
return Parsed(parsed.scheme.replace('http', 'amqp'), parsed.netloc,
parsed.path, parsed.params, parsed.query, parsed.fragment,
_urlparse.unquote(parsed.username),
_urlparse.unquote(parsed.password),
parsed.username,
parsed.password,
parsed.hostname, parsed.port)
 
 
Loading
Loading
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