]> git.ipfire.org Git - pakfire.git/commitdiff
config: Drop unused ConfigDaemon class
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 3 Dec 2016 13:44:13 +0000 (14:44 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 3 Dec 2016 13:44:13 +0000 (14:44 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/base.py
src/pakfire/config.py
src/pakfire/daemon.py

index cb1a34092bf59c07ba34db1f0a0cd34d022d78ff..9b47d490c92b95e91b17049475132e8e0823b65f 100644 (file)
@@ -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.
index f9b7cc7d2e1fc3c9614d963cd96d445df3a11091..67ac0d45720e2172ad2b311fa20d7a0e98203680 100644 (file)
@@ -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
index e74411f30cb13a33ad342fd58b133189f3b703f8..cbc205c562b1324c4a347fed279244ed0ea6cdf5 100644 (file)
@@ -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.