Don't ignore kwargs for uri style connections
This commit is contained in:
		| @@ -45,12 +45,14 @@ def register_connection(alias, name, host='localhost', port=27017, | ||||
|         if uri_dict.get('database') is None: | ||||
|             raise ConnectionError("If using URI style connection include "\ | ||||
|                                   "database name in string") | ||||
|         node = uri_dict['nodelist'][0] | ||||
|         host = node[0] | ||||
|         port = node[1] | ||||
|         name = uri_dict.get('database') | ||||
|         username = uri_dict.get('username') or username | ||||
|         password = uri_dict.get('password') or password | ||||
|         _connection_settings[alias] = { | ||||
|             'host': host, | ||||
|             'name': uri_dict.get('database'), | ||||
|             'username': uri_dict.get('username'), | ||||
|             'password': uri_dict.get('password') | ||||
|         } | ||||
|         _connection_settings[alias].update(kwargs) | ||||
|         return | ||||
|  | ||||
|     _connection_settings[alias] = { | ||||
|         'name': name, | ||||
| @@ -62,7 +64,6 @@ def register_connection(alias, name, host='localhost', port=27017, | ||||
|         'password': password, | ||||
|         'read_preference': read_preference | ||||
|     } | ||||
|  | ||||
|     _connection_settings[alias].update(kwargs) | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user