]> git.ipfire.org Git - pakfire.git/commitdiff
config: Drop everything we no longer need
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 20 Apr 2021 12:44:30 +0000 (12:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 20 Apr 2021 12:44:30 +0000 (12:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/config.py

index c0cecbefdd1019d92d6cecc5bc71c84de54a985e..d6eefcbaeec0837d05e0494dae22118aeda99e19 100644 (file)
 ###############################################################################
 
 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")