Merge pull request #3172 from gw0/fix-mongodb2.2-compat

Fix `mongodb_user` compatibility with MongoDB 2.2 (used in Debian 7).
This commit is contained in:
Michael DeHaan 2013-06-16 20:24:31 -07:00
commit 3e1e163ec3

View file

@ -84,13 +84,18 @@ EXAMPLES = '''
import ConfigParser
try:
from pymongo import MongoClient
from pymongo.errors import ConnectionFailure
from pymongo.errors import OperationFailure
from pymongo import MongoClient
except ImportError:
try: # for older PyMongo 2.2
from pymongo import Connection as MongoClient
except ImportError:
pymongo_found = False
else:
pymongo_found = True
else:
pymongo_found = True
# =========================================
# MongoDB module specific support methods.