mirror of
https://github.com/simple-login/app.git
synced 2024-09-30 05:31:30 +02:00
ignore the "Popped wrong app context" Assertion Error raised by AppContext
This commit is contained in:
parent
d4a6269e43
commit
61a8f1e676
@ -1251,10 +1251,14 @@ class MailHandler:
|
|||||||
smtp = SMTP(POSTFIX_SERVER, POSTFIX_PORT or 25)
|
smtp = SMTP(POSTFIX_SERVER, POSTFIX_PORT or 25)
|
||||||
|
|
||||||
app = new_app()
|
app = new_app()
|
||||||
with app.app_context():
|
try:
|
||||||
ret = await handle(envelope, smtp)
|
with app.app_context():
|
||||||
LOG.debug("takes %s seconds <<===", time.time() - start)
|
ret = await handle(envelope, smtp)
|
||||||
return ret
|
LOG.debug("takes %s seconds <<===", time.time() - start)
|
||||||
|
return ret
|
||||||
|
# ignore the "Popped wrong app context" Assertion Error raised by AppContext
|
||||||
|
except AssertionError as e:
|
||||||
|
LOG.warning("Error %s", e)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user