Skip to content

Commit

Permalink
remove tmp dir to resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi Sharma committed Jan 12, 2023
1 parent 5171c68 commit 3bf67fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openfl/interface/collaborator.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def generate_cert_request(collaborator_name, data_path, silent, skip_package,
from os import remove
from glob import glob

from openfl.utilities.utils import rmtree

archive_type = 'zip'
archive_name = f'col_{common_name}_to_agg_cert_request'
archive_file_name = archive_name + '.' + archive_type
Expand All @@ -223,6 +225,7 @@ def generate_cert_request(collaborator_name, data_path, silent, skip_package,

# Create Zip archive of directory
make_archive(archive_name, archive_type, tmp_dir)
rmtree(tmp_dir)

echo(f'Archive {archive_file_name} with certificate signing'
f' request created')
Expand Down Expand Up @@ -327,6 +330,7 @@ def certify(collaborator_name, silent, request_pkg=None, import_=False,
from openfl.cryptography.io import read_key
from openfl.cryptography.io import write_crt
from openfl.interface.cli_helper import CERT_DIR
from openfl.utilities.utils import rmtree

common_name = f'{collaborator_name}'.lower()

Expand Down Expand Up @@ -430,6 +434,7 @@ def certify(collaborator_name, silent, request_pkg=None, import_=False,

# Create Zip archive of directory
make_archive(archive_name, archive_type, tmp_dir)
rmtree(tmp_dir)

else:
# Copy the signed certificate and cert chain into PKI_DIR
Expand Down Expand Up @@ -536,6 +541,7 @@ def certify(collaborator_name, silent, request_pkg=None, import_=False,

# Create Zip archive of directory
make_archive(archive_name, archive_type, tmp_dir)
rmtree(tmp_dir)

else:
# Copy the signed certificate and cert chain into PKI_DIR
Expand Down

0 comments on commit 3bf67fb

Please sign in to comment.