Updated connection refs #474
This commit is contained in:
parent
fd2bb8ea45
commit
2a34358abc
@ -5,6 +5,7 @@ Changelog
|
||||
Changes in 0.6.X
|
||||
================
|
||||
|
||||
- updated replicasetconnection - pop port if exists
|
||||
- bug fix for unknown connection alias error message
|
||||
|
||||
Changes in 0.6.3
|
||||
|
@ -105,13 +105,13 @@ def get_connection(alias=DEFAULT_CONNECTION_NAME, reconnect=False):
|
||||
for slave_alias in conn_settings['slaves']:
|
||||
slaves.append(get_connection(slave_alias))
|
||||
conn_settings['slaves'] = slaves
|
||||
conn_settings.pop('read_preference')
|
||||
conn_settings.pop('read_preference', None)
|
||||
|
||||
connection_class = Connection
|
||||
if 'replicaSet' in conn_settings:
|
||||
conn_settings['hosts_or_uri'] = conn_settings.pop('host', None)
|
||||
# Discard port since it can't be used on ReplicaSetConnection
|
||||
conn_settings.pop('port')
|
||||
conn_settings.pop('port', None)
|
||||
connection_class = ReplicaSetConnection
|
||||
try:
|
||||
_connections[alias] = connection_class(**conn_settings)
|
||||
|
Loading…
x
Reference in New Issue
Block a user