Merge branch 'dev' of github.com:hmarr/mongoengine into dev

This commit is contained in:
Ross Lawley 2012-02-24 10:29:06 +00:00
commit 4466005363

View File

@ -42,7 +42,7 @@ def register_connection(alias, name, host='localhost', port=27017,
# Handle uri style connections # Handle uri style connections
if "://" in host: if "://" in host:
uri_dict = uri_parser.parse_uri(host) uri_dict = uri_parser.parse_uri(host)
if 'database' not in uri_dict: if uri_dict.get('database') is None:
raise ConnectionError("If using URI style connection include "\ raise ConnectionError("If using URI style connection include "\
"database name in string") "database name in string")
uri_dict['name'] = uri_dict.get('database') uri_dict['name'] = uri_dict.get('database')