Skip to content

Commit 76b8b40

Browse files
committed
Merge pull request mongodb#147 from mulka/master
improving warning message for URI
2 parents 0f9ab40 + 6e02ef8 commit 76b8b40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymongo/mongo_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ def __init__(self, host=None, port=None, max_pool_size=10,
274274
raise ConnectionFailure(str(e))
275275

276276
if db and username is None:
277-
warnings.warn("must provide a username and password "
278-
"to authenticate to %s" % (db,))
277+
warnings.warn("database name in URI is being ignored. if you wish to authenticate to %s, "
278+
"you must provide a username and password" % (db,))
279279
if username:
280280
db = db or "admin"
281281
if not self[db].authenticate(username, password):

0 commit comments

Comments
 (0)