Fix empty message array error when running on Windows

This commit is contained in:
Chaitanya Rahalkar 2024-03-24 12:08:44 -05:00
parent 725611e2b1
commit 7863497ac8
No known key found for this signature in database
1 changed files with 10 additions and 9 deletions

View File

@ -45,15 +45,16 @@ last_messages = ""
def check_filtered_kernel():
messages = get_kernel_messages()
messages.replace(last_messages, "")
messages = messages.split("\n")
filtered_messages = []
for message in messages:
if custom_filter(message):
filtered_messages.append(message)
return "\n".join(filtered_messages)
if messages:
messages.replace(last_messages, "")
messages = messages.split("\n")
filtered_messages = []
for message in messages:
if custom_filter(message):
filtered_messages.append(message)
return "\n".join(filtered_messages)
async def put_kernel_messages_into_queue(queue):
while True: