Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/buildservice/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/buildservice/__init__.py b/src/buildservice/__init__.py index 7a744f5..b9f3e65 100644 --- a/src/buildservice/__init__.py +++ b/src/buildservice/__init__.py @@ -74,6 +74,12 @@ class Backend(object): def read_config(self, path): c = ConfigParser.SafeConfigParser()
+ c.add_section("database") + c.set("database", "name", os.environ.get("PBS_DATABASE_NAME")) + c.set("database", "hostname", os.environ.get("PBS_DATABASE_HOSTNAME")) + c.set("database", "user", os.environ.get("PBS_DATABASE_USER")) + c.set("database", "password", os.environ.get("PBS_DATABASE_PASSWORD")) + # Load default configuration file first paths = [ os.path.join(CONFIGSDIR, "pbs.conf"),