def getOpenIDStore(filestore_path, table_prefix):
 if (not settings.DATABASE_ENGINE):
  return FileOpenIDStore(filestore_path)
 connection.cursor()
 tablenames = {'associations_table': (table_prefix + 'openid_associations'), 'nonces_table': (table_prefix + 'openid_nonces')}
 types = {'postgresql': sqlstore.PostgreSQLStore, 'mysql': sqlstore.MySQLStore, 'sqlite3': sqlstore.SQLiteStore}
 try:
  s = types[settings.DATABASE_ENGINE](connection.connection, **tablenames)
 except KeyError:
  raise ImproperlyConfigured, ('Database engine %s not supported by OpenID library' % (settings.DATABASE_ENGINE,))
 try:
  s.createTables()
 except (SystemExit, KeyboardInterrupt, MemoryError) as e:
  raise
 except:
  pass
 return s

def getOpenIDStore ( filestore_path , table_prefix ) : if ( not settings . DATABASE_ENGINE ) : return FileOpenIDStore ( filestore_path ) connection . cursor ( ) tablenames = { 'associations_table' : ( table_prefix + 'openid_associations' ) , 'nonces_table' : ( table_prefix + 'openid_nonces' ) } types = { 'postgresql' : sqlstore . PostgreSQLStore , 'mysql' : sqlstore . MySQLStore , 'sqlite3' : sqlstore . SQLiteStore } try : s = types [ settings . DATABASE_ENGINE ] ( connection . connection , ** tablenames ) except KeyError : raise ImproperlyConfigured , ( 'Database engine %s not supported by OpenID library' % ( settings . DATABASE_ENGINE , ) ) try : s . createTables ( ) except ( SystemExit , KeyboardInterrupt , MemoryError ) as e : raise except : pass return s
return an openid store object fit for the currently-chosen database backend .