Skip to content

Commit

Permalink
fix: properly split jsonl upload at lineends
Browse files Browse the repository at this point in the history
  • Loading branch information
akloeckner committed Aug 6, 2024
1 parent a8eb383 commit f800237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/openhasp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ async def send_lines(lines):
lines.append(json.dumps(item) + "\n")
await send_lines(lines)
else:
await send_lines(pages_file)
await send_lines(pages_file.splitlines(keepends=True))
await self.refresh()

except (IndexError, FileNotFoundError, IsADirectoryError, UnboundLocalError):
Expand Down

0 comments on commit f800237

Please sign in to comment.