Merge pull request #19296 from cachedout/mongodb_lint

MongoDB lint
This commit is contained in:
Mike Place 2014-12-30 12:07:10 -07:00
commit 3c44658388

View File

@ -18,7 +18,7 @@ from __future__ import absolute_import
# Import python libs
import logging
import json
from distutils.version import StrictVersion
import distutils.version
# Import salt libs
from salt.ext.six import string_types
@ -158,7 +158,7 @@ def user_list(user=None, password=None, host=None, port=None, database='admin'):
output = []
mongodb_version = mdb.eval('db.version()')
if StrictVersion(mongodb_version) >= StrictVersion('2.6'):
if distutils.version.StrictVersion(mongodb_version) >= distutils.version.StrictVersion('2.6'):
for user in mdb.eval('db.getUsers()'):
output.append([
('user', user['user']),