Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lloesche committed Oct 2, 2023
1 parent 1a35f21 commit 9e2ff49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions resotolib/resotolib/x509.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ def generate_ca_bundle_bytes(cert: Certificate, include_certifi: bool = True) ->

def write_ca_bundle(cert: Certificate, cert_path: str, include_certifi: bool = True, rename: bool = True) -> None:
tmp_cert_path = f"{cert_path}.tmp" if rename else cert_path
content = generate_ca_bundle_bytes(cert, include_certifi)
with open(tmp_cert_path, "wb") as f:
f.write(content)
f.write(generate_ca_bundle_bytes(cert, include_certifi))
if rename:
os.rename(tmp_cert_path, cert_path)

Expand Down

0 comments on commit 9e2ff49

Please sign in to comment.