From: Michael Tremer Date: Tue, 20 Apr 2021 12:44:30 +0000 (+0000) Subject: config: Drop everything we no longer need X-Git-Tag: 0.9.28~1285^2~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21bc345c1e852b5612681e388a05b8b389edad1d;p=pakfire.git config: Drop everything we no longer need Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/config.py b/src/pakfire/config.py index c0cecbefd..d6eefcbae 100644 --- a/src/pakfire/config.py +++ b/src/pakfire/config.py @@ -20,16 +20,13 @@ ############################################################################### import configparser -import io import logging import os -import socket log = logging.getLogger("pakfire.config") log.propagate = 1 from .constants import * -from .i18n import _ class Config(object): def __init__(self, *files): @@ -77,35 +74,6 @@ class Config(object): def get_bool(self, section, option, default=None): return self._config.getboolean(section, option, fallback=default) - def dump(self): - """ - Dump the configuration that was read - - (Only in debugging mode) - """ - log.debug(_("Configuration:")) - - for section in self._config.sections(): - log.debug(" " + _("Section: %s") % section) - - for option in self._config[section]: - value = self.get(section, option) - - log.debug(" %-20s: %s" % (option, value)) - - def get_repos(self): - repos = [] - for section in self._config.sections(): - if not section.startswith("repo:"): - continue - - name = section[5:] - - repo = self._config.items(section) - repos.append((name, dict(repo))) - - return repos - # Read initial configuration config = Config("general.conf")