Skip to content

Commit 83d0f39

Browse files
committed
TASK: If update is None, don't report that error
1 parent 33434ac commit 83d0f39

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ def game_commands(bot, update):
135135

136136
def error(bot, update, error):
137137
"""Log Errors caused by Updates."""
138+
if update is None:
139+
return
140+
138141
logger.warning('Update "%s" caused error "%s"', update, error)
139142

140143
db = DBwrapper.get_instance()

0 commit comments

Comments
 (0)