Skip to content

Commit

Permalink
Merge pull request #61 from Wenzel/fix/appdirs_import
Browse files Browse the repository at this point in the history
config: fix appdir import
  • Loading branch information
Wenzel authored Mar 16, 2023
2 parents 78ee110 + 7f77cd0 commit 00656f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- avoid Qemu hang when handling ABORT in pre-init phase (#34)
- fix including `default_settings.yaml` in the final package (#35)
- remove dynaconf validation workaround (#60)
- fix appdirs import (#61)

# 📖 Documentation

Expand Down
7 changes: 4 additions & 3 deletions kafl_fuzzer/common/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@

# default internal to kAFL
DEFAULT_CONFIG_FILENAME = "config.yaml"
APPDIRS = AppDirs(APPNAME)


def app_settings_files() -> List[str]:
settings_files = [
# default config
str(CUR_DIR / f"default_{SETTINGS_FILENAME}"),
# /etc/xdg/kAFL/
str(Path(appdirs.site_config_dir) / SETTINGS_FILENAME),
str(Path(APPDIRS.site_config_dir) / SETTINGS_FILENAME),
# $HOME/.config/kAFL
str(Path(appdirs.user_config_dir) / SETTINGS_FILENAME),
str(Path(APPDIRS.user_config_dir) / SETTINGS_FILENAME),
# local
"kafl.yaml",
]
Expand All @@ -41,7 +43,6 @@ def app_settings_files() -> List[str]:
settings_files.append(env_config_file)
return settings_files

appdirs = AppDirs(APPNAME)
settings = Dynaconf(
envvar_prefix=APPNAME.upper(),
settings_files=app_settings_files()
Expand Down

0 comments on commit 00656f0

Please sign in to comment.