mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #23932 from rallytime/bp-23908
Backport #23908 to 2015.5
This commit is contained in:
commit
ee4c01bf30
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ def _connect(user=None, password=None, host=None, port=None, database='admin'):
|
|||
port = __salt__['config.option']('mongodb.port')
|
||||
|
||||
try:
|
||||
conn = pymongo.connection.Connection(host=host, port=port)
|
||||
conn = pymongo.MongoClient(host=host, port=port)
|
||||
mdb = pymongo.database.Database(conn, database)
|
||||
if user and password:
|
||||
mdb.authenticate(user, password)
|
||||
|
|
Loading…
Add table
Reference in a new issue