Permalink
Browse files

Updated connection refs #474

  • Loading branch information...
1 parent fd2bb8e commit 2a34358abc40ad84a17014e41d9bd8af7c0fd071 @rozza rozza committed Mar 27, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 docs/changelog.rst
  2. +2 −2 mongoengine/connection.py
View
@@ -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)

0 comments on commit 2a34358

Please sign in to comment.