diff --git a/sat/tools/config.py b/sat/tools/config.py index a029523d..17867343 100644 --- a/sat/tools/config.py +++ b/sat/tools/config.py @@ -58,7 +58,9 @@ def fixConfigOption(section, option, value, silent=True): break if not target_file: # ... otherwise we create a new config file for that user - target_file = BaseDirectory.save_config_path("sat") + "/sat.conf" + target_file = ( + f"{BaseDirectory.save_config_path(C.APP_NAME_FILE)}/{C.APP_NAME_FILE}.conf" + ) if section and section.upper() != DEFAULTSECT and not config.has_section(section): config.add_section(section) config.set(section, option, value) @@ -84,9 +86,14 @@ def parseMainConf(log_filenames=False): log.error(_("Can't read main config: {msg}").format(msg=e), exc_info=True) else: if log_filenames: - log.info( - _("Configuration was read from: {filenames}").format( - filenames=', '.join(filenames))) + if filenames: + log.info( + _("Configuration was read from: {filenames}").format( + filenames=', '.join(filenames))) + else: + log.warning( + _("No configuration file found, using default settings") + ) return config