|
|
@ -81,13 +81,18 @@ author: Elliott Foster
|
|
|
|
|
|
|
|
|
|
|
|
import ConfigParser
|
|
|
|
import ConfigParser
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
from pymongo import MongoClient
|
|
|
|
|
|
|
|
from pymongo.errors import ConnectionFailure
|
|
|
|
from pymongo.errors import ConnectionFailure
|
|
|
|
from pymongo.errors import OperationFailure
|
|
|
|
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:
|
|
|
|
except ImportError:
|
|
|
|
pymongo_found = False
|
|
|
|
pymongo_found = False
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
pymongo_found = True
|
|
|
|
pymongo_found = True
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
pymongo_found = True
|
|
|
|
|
|
|
|
|
|
|
|
# =========================================
|
|
|
|
# =========================================
|
|
|
|
# MongoDB module specific support methods.
|
|
|
|
# MongoDB module specific support methods.
|
|
|
|