コード例 #1
0
ファイル: test_flask.py プロジェクト: L1nwatch/Mac-Python-3.X
def close_db(error):
    """
    Closes the database again at the end of the request. Note the 'g' object which makes sure
    we only operate on the current request.

    g对象保持每个请求分开.这样在关闭一个数据库连接时,并不会关闭所有数据库连接.
    :param error:
    :return:
    """
    if hasattr(g, "sqlite_db"):
        lendydata.close_db()
コード例 #2
0
def close_db(error):
    """
    Closes the database again at the end of the request. Note the 'g' object which makes sure
    we only operate on the current request.

    g对象保持每个请求分开.这样在关闭一个数据库连接时,并不会关闭所有数据库连接.
    :param error:
    :return:
    """
    if hasattr(g, "sqlite_db"):
        lendydata.close_db()
コード例 #3
0
ファイル: lendy-gui.py プロジェクト: L1nwatch/Mac-Python-3.X
 def ev_close(self, event=None):
     data.close_db()
     self.top.quit()
コード例 #4
0
ファイル: lendy-gui.py プロジェクト: dnnb/Mac-Python-3.X
 def ev_close(self, event=None):
     data.close_db()
     self.top.quit()