Skip to content

Commit

Permalink
chore: clean up encode_to_base64
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee committed Feb 28, 2024
1 parent 785730b commit f27b157
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ def encode_to_base64(file: Path) -> str:
Returns:
The encoded contents of the PEM file.
"""
with file.open("r") as file_handle:
pem_contents = file_handle.read()

encoded_contents = base64.b64encode(pem_contents.encode("utf-8"))
pem_contents = file.read_bytes()
encoded_contents = base64.b64encode(pem_contents)
return encoded_contents.decode("utf-8")

0 comments on commit f27b157

Please sign in to comment.