Example #1
0
 def __init__(self, cfg=None):
     if cfg is None:
         cfg = PaellaConfig('database')
     if type(cfg) is not dict:
         dsn = cfg.get_dsn()
     else:
         dsn = cfg
     if os.environ.has_key('PAELLA_DBHOST'):
         dsn['dbhost'] = os.environ['PAELLA_DBHOST']
     if os.environ.has_key('PAELLA_DBNAME'):
         dsn['dbname'] = os.environ['PAELLA_DBNAME']
     QuickConn.__init__(self, dsn)
Example #2
0
 def __init__(self, cfg=Configuration('repos')):
     QuickConn.__init__(self, cfg)