Merge pull request #24139 from rallytime/bp-24118

Backport #24118 to 2015.5
This commit is contained in:
Justin Findlay 2015-05-26 12:24:27 -06:00
commit 084166747c

View file

@ -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(