mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
examples/conversationbot2.py: Use context.error in error()
(#1474)
This commit is contained in:
parent
316d046628
commit
2cb6377dab
2 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ def done(update, context):
|
||||||
|
|
||||||
def error(update, context):
|
def error(update, context):
|
||||||
"""Log Errors caused by Updates."""
|
"""Log Errors caused by Updates."""
|
||||||
logger.warning('Update "%s" caused error "%s"', update, error)
|
logger.warning('Update "%s" caused error "%s"', update, context.error)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
@ -113,7 +113,7 @@ def done(update, context):
|
||||||
|
|
||||||
def error(update, context):
|
def error(update, context):
|
||||||
"""Log Errors caused by Updates."""
|
"""Log Errors caused by Updates."""
|
||||||
logger.warning('Update "%s" caused error "%s"', update, error)
|
logger.warning('Update "%s" caused error "%s"', update, context.error)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in a new issue