From 2cb6377dab4106b2e23d65785bba6f28dc62e925 Mon Sep 17 00:00:00 2001 From: Zhuoyun Wei Date: Fri, 23 Aug 2019 23:24:20 +0800 Subject: [PATCH] examples/conversationbot2.py: Use context.error in `error()` (#1474) --- examples/conversationbot2.py | 2 +- examples/persistentconversationbot.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/conversationbot2.py b/examples/conversationbot2.py index 2f5cc8347..6c8449bc3 100644 --- a/examples/conversationbot2.py +++ b/examples/conversationbot2.py @@ -102,7 +102,7 @@ def done(update, context): def error(update, context): """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(): diff --git a/examples/persistentconversationbot.py b/examples/persistentconversationbot.py index 637ae7e8d..366f56245 100644 --- a/examples/persistentconversationbot.py +++ b/examples/persistentconversationbot.py @@ -113,7 +113,7 @@ def done(update, context): def error(update, context): """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():