Skip to content

Commit

Permalink
Fix profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekmj303 committed Dec 20, 2023
1 parent 0bfe0d1 commit de9a72d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions harden/config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ def get_profiles():
init_config_dir()
return []

profiles = os.listdir(PROFILE_DIR)
for i in range(len(profiles)):
profiles[i] = profiles[i].replace("_config.toml", "")
all_files = os.listdir(PROFILE_DIR)
profiles = []
for file in all_files:
if file.endswith("_config.toml"):
profiles.append(file.replace("_config.toml", ""))

return profiles

Expand Down

0 comments on commit de9a72d

Please sign in to comment.