Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/o/p/openerp-server-5.0.0-3/bin/service/web_services.py   openerp-server(Download)
        self.actions[id] = {'clean': False}
 
        db = sql_db.db_connect('template1')
        cr = db.serialized_cursor()
        try:
        logger = netsvc.Logger()
 
        db = sql_db.db_connect('template1')
        cr = db.serialized_cursor()
        cr.autocommit(True) # XXX inhibit the effect of a serialized cursor. is it what we want ?
            raise Exception, "Database already exists"
 
        db = sql_db.db_connect('template1')
        cr = db.serialized_cursor()
        cr.autocommit(True) # XXX inhibit the effect of a serialized cursor. is it what we want ?
    def db_exist(self, db_name):
        try:
            db = sql_db.db_connect(db_name)
            return True
        except:
            return False
 
    def list(self):
        db = sql_db.db_connect('template1')

src/o/p/openerp-server-5.0.0-3/bin/pooler.py   openerp-server(Download)
    # this resulting of having the logs outputed twice...
    import sql_db
    db = sql_db.db_connect(db_name)
    return db