

def openConnection_odbc():
    logger = logging.getLogger(__name__)
    try:
        _ = threadVar.connection
    except:
        threadVar.connection = None
    if (threadVar.connection is None):
        logger.info('To get database meta connection')
        threadVar.connection = pypyodbc.connect(conf.metadb_url_odbc)
        logger.info('Meta connection: %s', (threadVar.connection,))
    return threadVar.connection

dataset/ETHPy150Open harryliu/edwin/edwinServer/common/database_meta.py openConnection_odbc/original