示例#1
0
    def __init__(self):
        DatabasePlugin.__init__(self)

        # noinspection PyUnresolvedReferences
        dbpassword = config.get("database", "password")
        if dbpassword:
            dbpool = MyConnectionPool(config.get("database", "adapter"),
                                      user=config.get("database", "username"),
                                      password=dbpassword,
                                      host=config.get("database", "host"),
                                      port=config.get("database", "port"),
                                      database=config.get("database", "dbname"))
        else:
            dbpool = MyConnectionPool(config.get("database", "adapter"),
                                      user=config.get("database", "username"),
                                      database=config.get("database", "dbname"))
        self.dbpool = dbpool
示例#2
0
    def __init__(self):
        DatabasePlugin.__init__(self)

        # noinspection PyUnresolvedReferences
        dbpassword = config.get("database", "password")
        if dbpassword:
            dbpool = MyConnectionPool(config.get("database", "adapter"),
                                      user=config.get("database", "username"),
                                      password=dbpassword,
                                      host=config.get("database", "host"),
                                      port=config.get("database", "port"),
                                      database=config.get(
                                          "database", "dbname"))
        else:
            dbpool = MyConnectionPool(config.get("database", "adapter"),
                                      user=config.get("database", "username"),
                                      database=config.get(
                                          "database", "dbname"))
        self.dbpool = dbpool
示例#3
0
文件: mem.py 项目: ysobolev/sputnik
 def __init__(self):
     DatabasePlugin.__init__(self)
     self.users = {}
示例#4
0
文件: mem.py 项目: Mrkebubun/sputnik
 def __init__(self):
     DatabasePlugin.__init__(self)
     self.users = {}