Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/b/e/bench-HEAD/mongo_database.py   bench(Download)
 
from base_database import BaseDatabase
from config import MONGO_FLAGS, MONGO_USER, MONGO_PWD, MONGO_DROP_DATABASE, MONGO_SHARDED_DATABASE
 
class MongoDatabase(BaseDatabase):
        if MONGO_USER != '': 
            try:
                self.db.authenticate(MONGO_USER,MONGO_PWD)
            except Exception, e:
                print e