From e0bb9960fbdb039ff07b88e05f95530ffddfc3ae Mon Sep 17 00:00:00 2001 From: 2FWAH <36737818+2FWAH@users.noreply.github.com> Date: Tue, 12 Jun 2018 08:15:53 +0200 Subject: [PATCH] Check if list is empty with if instead of len() --- fbchat/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fbchat/client.py b/fbchat/client.py index 6a28813..a1cc49e 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -484,7 +484,7 @@ class Client(object): """ threads = [] threads += self.fetchThreadList(thread_location=thread_location) - if len(threads) == 0: + if not threads: return [] while True: lastThreadTimestamp = threads[-1].last_message_timestamp