From: Michael Tremer Date: Sat, 3 Dec 2016 13:44:13 +0000 (+0100) Subject: config: Drop unused ConfigDaemon class X-Git-Tag: 0.9.28~1285^2~1423 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97eac7553aa47a038369d599f4cea4a08fbc9753;p=pakfire.git config: Drop unused ConfigDaemon class Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/base.py b/src/pakfire/base.py index cb1a34092..9b47d490c 100644 --- a/src/pakfire/base.py +++ b/src/pakfire/base.py @@ -101,7 +101,10 @@ class Pakfire(object): """ This method loads all needed configuration files. """ - return config.Config(files=files) + if files is None: + files = [] + + return config.Config(*files) def __del__(self): # Reset logging. diff --git a/src/pakfire/config.py b/src/pakfire/config.py index f9b7cc7d2..67ac0d457 100644 --- a/src/pakfire/config.py +++ b/src/pakfire/config.py @@ -279,26 +279,3 @@ class ConfigBuilder(_Config): self.read(filename) return True - - -class ConfigDaemon(_Config): - files = ["general.conf", "daemon.conf"] - - default_settings = { - "daemon" : { - # The default server is the official Pakfire - # server. - "server" : PAKFIRE_HUB, - - # The default hostname is the host name of this - # machine. - "hostname" : system.hostname, - }, - } - - def get_hub_credentials(self): - hub_url = self.get("daemon", "server") - hostname = self.get("daemon", "hostname") - password = self.get("daemon", "secret") - - return hub_url, hostname, password diff --git a/src/pakfire/daemon.py b/src/pakfire/daemon.py index e74411f30..cbc205c56 100644 --- a/src/pakfire/daemon.py +++ b/src/pakfire/daemon.py @@ -488,7 +488,7 @@ class PakfireWorker(multiprocessing.Process): logfile = os.path.join(tmpdir, "build.log") # Create pakfire configuration instance. - config = pakfire.config.ConfigDaemon() + config = pakfire.config.Config() config.parse(job.config) # Create pakfire instance.