"""
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.
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
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.