~hristoast/mousikofidi

ce6cb1e4c51c56fd613de1aec6fd92cc3c25ed9b — Hristos N. Triantafillou 8 months ago 3fe23b6 0.16
Give a proper message when there's no config file
1 files changed, 12 insertions(+), 1 deletions(-)

M mousikofidi/mousikofidi.py
M mousikofidi/mousikofidi.py => mousikofidi/mousikofidi.py +12 -1
@@ 301,7 301,18 @@ def init(
        dbg("Reading User Config: " + user_config_file)
        fidi_config = user_config_file

    c = yaml.load(config_to_string(fidi_config), Loader=yaml.BaseLoader)
    if fidi_config:
        c = yaml.load(config_to_string(fidi_config), Loader=yaml.BaseLoader)
    else:
        err("")
        err("No valid configuration file was provided!")
        err("Please see this URL for how to get setup with a config file:")
        err("")
        err("https://man.sr.ht/~hristoast/mousikofidi/setup.md#configuring-mousikfdi")
        err("")
        err("MousikóFídi will not work without a valid config file!")
        err("")
        return abort(500)

    # TODO: A more DRY way to handle checking for configs
    try: