diff --git a/pyproject.toml b/pyproject.toml index a8ca52c..6c6b56b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "brewserverblocklist" -version = "1.1.2" +version = "1.1.3" description = "A python script to collect the server-wide blocklists from Friendica nodes to build a collection from trusted admin choice" authors = ["Tobias Diekershoff"] license = "GNU General Public License v3.0" diff --git a/src/brewserverblocklist/brewserverblocklist.py b/src/brewserverblocklist/brewserverblocklist.py index 633e17a..04154dd 100644 --- a/src/brewserverblocklist/brewserverblocklist.py +++ b/src/brewserverblocklist/brewserverblocklist.py @@ -36,7 +36,11 @@ class BrewBlocklist(): config = configparser.RawConfigParser() config.read(configfile) for section in config.sections(): + print(section) section_values = dict(config.items(section)) + if (section.find('http://') > -1) or (section.find('https://') > -1): + print('The section name in the config file must not contain the protocol ({})'.format(section)) + sys.exit(1) if not section == 'safe harbor': if not 'type' in section_values.keys(): section_values['type'] = 'friendica' @@ -181,7 +185,7 @@ def main(): arg_auto_accept = not args.auto_accept_direction is None if not exists(args.configfile): print('The config file {} was not found.'.format(args.configfile)) - sys.exit() + sys.exit(1) brew = BrewBlocklist(args.configfile, args.outputfile, arg_auto_accept, args.auto_accept_direction, args.confidence) brew.collect_ingrediens()