Fix bug while reading yaml file from utils/g5505_utils.py

This commit is contained in:
2025-06-10 14:38:29 +02:00
parent ab897018d9
commit 7d710c1e62
2 changed files with 5 additions and 4 deletions

View File

@ -3,3 +3,4 @@ exclude_paths:
- .ipynb_checkpoints
- .renku
- .git
# - params

View File

@ -308,10 +308,10 @@ def copy_directory_with_contraints(input_dir_path, output_dir_path,
select_dir_keywords = [keyword.replace('/',os.sep) for keyword in select_dir_keywords]
try:
with open(os.path.join(dimaPath, 'utils/exclude_path_keywords.yaml'), 'r') as stream:
with open(os.path.join(dimaPath, 'dima/utils/exclude_path_keywords.yaml'), 'r') as stream:
exclude_path_dict = yaml.safe_load(stream)
if isinstance(exclude_path_dict, dict):
exclude_path_keywords = exclude_path_dict.get('containing', [])
exclude_path_keywords = exclude_path_dict.get('exclude_paths',{}).get('containing', [])
if not all(isinstance(keyword, str) for keyword in exclude_path_keywords):
exclude_path_keywords = []
else: