Check if list is empty with if instead of len()

This commit is contained in:
2FWAH
2018-06-12 08:15:53 +02:00
committed by GitHub
parent 71608845c0
commit e0bb9960fb

View File

@@ -484,7 +484,7 @@ class Client(object):
""" """
threads = [] threads = []
threads += self.fetchThreadList(thread_location=thread_location) threads += self.fetchThreadList(thread_location=thread_location)
if len(threads) == 0: if not threads:
return [] return []
while True: while True:
lastThreadTimestamp = threads[-1].last_message_timestamp lastThreadTimestamp = threads[-1].last_message_timestamp