Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

populate.py: crash on empty message list #112

Open
leamas opened this issue Oct 5, 2023 · 0 comments
Open

populate.py: crash on empty message list #112

leamas opened this issue Oct 5, 2023 · 0 comments

Comments

@leamas
Copy link

leamas commented Oct 5, 2023

When populate.py encounters an empty messages list around line 149 this leads to index out of bounds error in line 151 last_message = messages[-1]

A simple fix is:

index 9e93e839d23..9951af3cae2 100644
--- b/lib/populate.py
+++ a/lib/populate.py
@@ -147,6 +147,8 @@ def populate_all(
             }
 
             messages = request_all(client, request)
+            if not messages:
+                continue
 
             topic_count = len(messages)
             last_message = messages[-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant