Update the signature of the teardown function (#3730)

Co-authored-by: David Lord <davidism@gmail.com>
This commit is contained in:
Jamiu Salimon 2020-10-15 22:02:54 +01:00 committed by GitHub
parent 426d0e4e9a
commit 096ace23ba

View file

@ -119,7 +119,7 @@ For example, you can manage a database connection using this pattern::
return g.db
@app.teardown_appcontext
def teardown_db():
def teardown_db(exception):
db = g.pop('db', None)
if db is not None: