Fix function being printed

This commit is contained in:
Joscha 2021-05-26 10:52:04 +02:00
parent 915e42fd07
commit a879c6ab6e
3 changed files with 7 additions and 1 deletions

View File

@ -19,7 +19,7 @@ def load_config_parser(args: argparse.Namespace) -> configparser.ConfigParser:
log.explain("No CLI command specified, loading config from file")
Config.load_parser(parser, path=args.config)
else:
log.explain(f"CLI command specified, creating config for {args.command!r}")
log.explain("CLI command specified, loading config from its arguments")
if args.command:
args.command(args, parser)

View File

@ -3,6 +3,7 @@ import configparser
from pathlib import Path
from ..crawl.ilias.file_templates import Links
from ..logging import log
from .parser import CRAWLER_PARSER, SUBPARSERS, BooleanOptionalAction, load_crawler, show_value_error
SUBPARSER = SUBPARSERS.add_parser(
@ -66,6 +67,8 @@ def load(
args: argparse.Namespace,
parser: configparser.ConfigParser,
) -> None:
log.explain("Creating config for command 'kit-ilias-web'")
parser["crawl:ilias"] = {}
section = parser["crawl:ilias"]
load_crawler(args, section)

View File

@ -2,6 +2,7 @@ import argparse
import configparser
from pathlib import Path
from ..logging import log
from .parser import CRAWLER_PARSER, SUBPARSERS, load_crawler
SUBPARSER = SUBPARSERS.add_parser(
@ -49,6 +50,8 @@ def load(
args: argparse.Namespace,
parser: configparser.ConfigParser,
) -> None:
log.explain("Creating config for command 'local'")
parser["crawl:local"] = {}
section = parser["crawl:local"]
load_crawler(args, section)