Skip to content

Commit

Permalink
chore(content): Use Path.write_text
Browse files Browse the repository at this point in the history
  • Loading branch information
merkata committed Jun 19, 2024
1 parent 808bb14 commit 435e3b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ def _write(self, path: pathlib.Path, source: str) -> None:
path: The path of the file
source: The contents of the file to be pushed
"""
with open(path, "w", encoding="utf-8") as write_file:
write_file.write(source)
logger.info("Pushed file %s", path)
path.write_text(source, encoding="utf-8")
logger.info("Pushed file %s", path)

def _generate_PEM_file_local(self) -> str:
"""Generate the PEM file content.
Expand Down

0 comments on commit 435e3b1

Please sign in to comment.