]> git.ipfire.org Git - pbs.git/commitdiff
backend: Drop reading any configuration from the environment
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Oct 2022 17:05:53 +0000 (17:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Oct 2022 17:05:53 +0000 (17:05 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/__init__.py

index 34635f9af75dd219e15e4a655abc66931041e8e8..c56cda91b1a75721fa52b488dcbe2b6ba21776ab 100644 (file)
@@ -81,30 +81,9 @@ class Backend(object):
 
                log.info("Pakfire Build Service initialized at %s" % self.basepath)
 
-       @lazy_property
-       def _environment_configuration(self):
-               env = {}
-
-               # Get database configuration
-               env["database"] = {
-                       "name"     : os.environ.get("PBS_DATABASE_NAME"),
-                       "hostname" : os.environ.get("PBS_DATABASE_HOSTNAME"),
-                       "user"     : os.environ.get("PBS_DATABASE_USER"),
-                       "password" : os.environ.get("PBS_DATABASE_PASSWORD"),
-               }
-
-               return env
-
        def read_config(self, path):
                c = configparser.ConfigParser()
 
-               # Import configuration from environment
-               for section in self._environment_configuration:
-                       c.add_section(section)
-
-                       for k in self._environment_configuration[section]:
-                               c.set(section, k, self._environment_configuration[section][k] or "")
-
                # Load default configuration file first
                paths = [
                        os.path.join(CONFIGSDIR, "pbs.conf"),