Skip to content
Snippets Groups Projects
Commit 4372e343 authored by Gavin M. Roy's avatar Gavin M. Roy Committed by GitHub
Browse files

Merge pull request #97 from fizyk/default_user_pass

allow for username and password to be default again - fixes #96
parents 5b6d55d5 be9cb08c
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