Config and JSON files by default live in script's dir
This commit is contained in:
@@ -165,7 +165,7 @@ class ConfigParser(
|
||||
ini_defaults = []
|
||||
internal_defaults = {default["key"]: default["value"] for default in CONST.CFG_KNOWN_DEFAULTS}
|
||||
config = ConfigParser(defaults=internal_defaults)
|
||||
config.read(CONST.CFG_DEFAULT_FILENAME)
|
||||
config.read(CONST.CFG_DEFAULT_ABS_PATH)
|
||||
|
||||
|
||||
def print_section_header(
|
||||
@@ -233,7 +233,8 @@ def validate_config_sections(
|
||||
|
||||
def query_string_from_file(
|
||||
filename: str) -> str:
|
||||
with open(filename, "r", encoding="utf-8") as jsonfile:
|
||||
filename_abs_path = os.path.join(CONST.CFG_THIS_FILE_DIRNAME, filename)
|
||||
with open(filename_abs_path, "r", encoding="utf-8") as jsonfile:
|
||||
query_string = jsonfile.read()
|
||||
return query_string
|
||||
|
||||
|
Reference in New Issue
Block a user