From 6a63208f368615d306768d7774b65aced0ad262a Mon Sep 17 00:00:00 2001 From: JannisBush <33023300+JannisBush@users.noreply.github.com> Date: Wed, 2 Nov 2022 14:29:28 +0100 Subject: [PATCH] Use config file for redbot_cli --- bin/redbot_cli | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/redbot_cli b/bin/redbot_cli index 48b84664..e66106e3 100755 --- a/bin/redbot_cli +++ b/bin/redbot_cli @@ -9,6 +9,7 @@ __author__ = "Jerome Renard " from configparser import ConfigParser from argparse import ArgumentParser import sys +import os import thor @@ -45,7 +46,7 @@ def main() -> None: args = parser.parse_args() config_parser = ConfigParser() - config_parser.read_dict({"redbot": {"lang": "en", "charset": "utf-8"}}) + config_parser.read(os.environ.get("REDBOT_CONFIG", "config.txt")) config = config_parser["redbot"] resource = HttpResource(config, descend=args.descend)