From c3188ff0fa843245c42c773b9817fe7162eb38d6 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 23 Dec 2019 14:49:40 +0100 Subject: [PATCH] Handle empty list properly in buttons --- telethon/client/buttons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/client/buttons.py b/telethon/client/buttons.py index c134e838..22e6bebf 100644 --- a/telethon/client/buttons.py +++ b/telethon/client/buttons.py @@ -48,7 +48,7 @@ class ButtonMethods: if not utils.is_list_like(buttons): buttons = [[buttons]] - elif not utils.is_list_like(buttons[0]): + elif not buttons or not utils.is_list_like(buttons[0]): buttons = [buttons] is_inline = False