mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
removed deprecated pymongo usage as no longer functional with pymongo > 3.x
This commit is contained in:
parent
4e8c5031b0
commit
e2217a09e8
1 changed files with 2 additions and 2 deletions
|
@ -116,7 +116,7 @@ def ext_pillar(minion_id,
|
|||
host = __opts__['mongo.host']
|
||||
port = __opts__['mongo.port']
|
||||
log.info('connecting to {0}:{1} for mongo ext_pillar'.format(host, port))
|
||||
conn = pymongo.Connection(host, port)
|
||||
conn = pymongo.MongoClient(host, port)
|
||||
|
||||
log.debug('using database \'{0}\''.format(__opts__['mongo.db']))
|
||||
mdb = conn[__opts__['mongo.db']]
|
||||
|
@ -139,7 +139,7 @@ def ext_pillar(minion_id,
|
|||
)
|
||||
)
|
||||
|
||||
result = mdb[collection].find_one({id_field: minion_id}, fields=fields)
|
||||
result = mdb[collection].find_one({id_field: minion_id}, projection=fields)
|
||||
if result:
|
||||
if fields:
|
||||
log.debug(
|
||||
|
|
Loading…
Add table
Reference in a new issue