mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #24139 from rallytime/bp-24118
Backport #24118 to 2015.5
This commit is contained in:
commit
084166747c
1 changed files with 2 additions and 2 deletions
|
@ -117,7 +117,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']]
|
||||
|
@ -140,7 +140,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