Skip to content

Commit

Permalink
fix: [main] fix issue discovering case_data_subfolder when other fold…
Browse files Browse the repository at this point in the history
…ers are also present
  • Loading branch information
cvandeplas committed Oct 8, 2024
1 parent 2935417 commit 522aa42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sysdiagnose/utils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __init__(self, module_filename: str, config: SysdiagnoseConfig, case_id: str

self.case_data_folder = config.get_case_data_folder(case_id)
os.makedirs(self.case_data_folder, exist_ok=True)
self.case_data_subfolder = os.path.join(self.case_data_folder, os.listdir(self.case_data_folder)[0])
case_data_folder_dirlist = os.listdir(self.case_data_folder)
self.case_data_subfolder = os.path.join(self.case_data_folder, [item for item in case_data_folder_dirlist if 'sysdiagnose_' in item][0])

self.case_parsed_data_folder = config.get_case_parsed_data_folder(case_id)
os.makedirs(self.case_parsed_data_folder, exist_ok=True)
Expand Down

0 comments on commit 522aa42

Please sign in to comment.