From 13a9c800f21e5c557a06c0ba8cc0d7b7b901aa56 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 19 Apr 2024 17:08:37 +0800 Subject: [PATCH] fix: close file --- separate_intermediates/profile.py | 2 +- tls_gen/gen.py | 6 +++--- two_shared_intermediates/profile.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/separate_intermediates/profile.py b/separate_intermediates/profile.py index e028609..10eb074 100644 --- a/separate_intermediates/profile.py +++ b/separate_intermediates/profile.py @@ -36,7 +36,7 @@ def _concat_ca_certificates_of(peer): p.intermediate_ca_certificate_path(peer), p.root_ca_certificate_path()], stdout=chain_file) - chain_file.close + chain_file.close() def generate(opts): diff --git a/tls_gen/gen.py b/tls_gen/gen.py index 4a22c90..7c62af4 100644 --- a/tls_gen/gen.py +++ b/tls_gen/gen.py @@ -117,12 +117,12 @@ def prepare_ca_directory(dir_name): serial = open(p.relative_path(dir_name, "serial"), "w") serial.write("01") - serial.close + serial.close() index_txt = open(p.relative_path(dir_name, "index.txt"), "w") - index_txt.close + index_txt.close() index_txt = open(p.relative_path(dir_name, "index.txt.attr"), "w") - index_txt.close + index_txt.close() # # Root CA diff --git a/two_shared_intermediates/profile.py b/two_shared_intermediates/profile.py index 8403ccb..4398d91 100644 --- a/two_shared_intermediates/profile.py +++ b/two_shared_intermediates/profile.py @@ -30,7 +30,7 @@ def _concat_certificates(): p.intermediate_ca_certificate_path("1"), p.root_ca_certificate_path()], stdout=chain_file) - chain_file.close + chain_file.close() def generate(opts):