Skip to content

Commit

Permalink
Merge pull request OpenInterpreter#139 from chaitanyarahalkar/main
Browse files Browse the repository at this point in the history
Fix empty message array error when running on Windows
  • Loading branch information
tyfiero authored Mar 28, 2024
2 parents 6ef8e86 + 7863497 commit 0fa5241
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions software/source/server/utils/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ def custom_filter(message):

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:
Expand Down

0 comments on commit 0fa5241

Please sign in to comment.