Skip to content

Commit

Permalink
cleanup of unnecessary connection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
wojcikstefan committed Dec 23, 2016
1 parent 97ae31f commit b5b4609
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions flask_mongoengine/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ def _sanitize_settings(settings):
# Default to ReadPreference.PRIMARY if no read_preference is supplied
resolved_settings['read_preference'] = resolved_settings.get('read_preference', ReadPreference.PRIMARY)

# Rename "replicaset" to "replicaSet" if it exists in the dict
# TODO is this necessary? PyMongo normalizes the options and makes them
# all lowercase via pymongo.common.validate (which is called in
# MongoClient.__init__), so both "replicaset and "replicaSet" should be
# valid
# if 'replicaset' in resolved_settings:
# resolved_settings['replicaSet'] = resolved_settings.pop('replicaset')

# Clean up empty values
for k, v in list(resolved_settings.items()):
if v is None:
Expand Down

0 comments on commit b5b4609

Please sign in to comment.