Skip to content

Commit

Permalink
fix: firmware_creator: use write_bytes to avoid windows newline endin…
Browse files Browse the repository at this point in the history
…gs problems

Related: #58
Signed-off-by: yshalsager <[email protected]>
  • Loading branch information
yshalsager committed Feb 13, 2023
1 parent 00f6ff0 commit facae6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xiaomi_flashable_firmware_creator/helpers/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ class ScriptTemplate(Template):


def write_text_to_file(file: Union[str, Path], text: str):
Path(file).write_text(text, encoding="utf-8", newline="\n")
Path(file).write_bytes(text.encode("utf-8"))
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from xiaomi_flashable_firmware_creator.firmware_creator import FlashableFirmwareCreator


def arg_parse() -> (str, str, str):
def arg_parse() -> tuple[str, str, str]:
"""
Parse command-line arguments.
Expand Down

0 comments on commit facae6f

Please sign in to comment.