From aff9cea868afe26136c40efe7c664779ec13924d Mon Sep 17 00:00:00 2001 From: Renata Date: Tue, 15 Oct 2024 21:13:55 -0400 Subject: [PATCH] test --- taf/api/repository.py | 2 +- taf/api/roles.py | 2 +- taf/api/utils/_conf.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/taf/api/repository.py b/taf/api/repository.py index b2f35f65..2ef432f1 100644 --- a/taf/api/repository.py +++ b/taf/api/repository.py @@ -66,7 +66,7 @@ def create_repository( if not _check_if_can_create_repository(auth_repo): return - if not keystore: + if not keystore and auth_repo.path is not None: keystore = find_keystore(auth_repo.path) roles_key_infos_dict, keystore, skip_prompt = _initialize_roles_and_keystore( roles_key_infos, keystore diff --git a/taf/api/roles.py b/taf/api/roles.py index 89ee5aef..58b137f5 100644 --- a/taf/api/roles.py +++ b/taf/api/roles.py @@ -555,7 +555,7 @@ def _initialize_roles_and_keystore_for_existing_repo( roles_key_infos_dict = _enter_roles_infos(None, roles_key_infos) roles_keys_data = from_dict(roles_key_infos_dict, RolesKeysData) keystore = keystore or roles_keys_data.keystore - if keystore is None: + if keystore is None and path is not None: keystore = find_keystore(Path(path)) roles_keys_data.keystore = keystore return roles_keys_data diff --git a/taf/api/utils/_conf.py b/taf/api/utils/_conf.py index 45c87a4d..0023e355 100644 --- a/taf/api/utils/_conf.py +++ b/taf/api/utils/_conf.py @@ -1,6 +1,6 @@ from taf.log import taf_logger from pathlib import Path -from typing import Optional, Union +from typing import Optional def find_taf_directory(auth_repo_path: Path) -> Optional[Path]: