Commit 3e1e163e by Michael DeHaan

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

Fix `mongodb_user` compatibility with MongoDB 2.2 (used in Debian 7).
parents 45f96427 47c83965
......@@ -84,11 +84,16 @@ EXAMPLES = '''
import ConfigParser
try:
from pymongo import MongoClient
from pymongo.errors import ConnectionFailure
from pymongo.errors import OperationFailure
from pymongo import MongoClient
except ImportError:
pymongo_found = False
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment