]> git.ipfire.org Git - pbs.git/commitdiff
web: Correctly deliver repository configuration
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Mar 2023 18:49:59 +0000 (18:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Mar 2023 18:49:59 +0000 (18:49 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/repos.py

index 8af6a6366baef9f826e83418fb9ef47f14531c8d..06782e305c9ef3a1b30b2f0ddd70447249d6bb01 100644 (file)
@@ -19,6 +19,7 @@
 #                                                                             #
 ###############################################################################
 
+import configparser
 import tornado.web
 
 from . import base
@@ -107,15 +108,17 @@ class ConfigHandler(BaseHandler):
                # Fetch the repository
                repo = self._get_repo(**kwargs)
 
-               # This is plain text
-               self.set_header("Content-Type", "text/plain")
-
                # Generate configuration
+               config = configparser.ConfigParser(interpolation=None)
+
                with self.db.transaction():
-                       config = repo._make_config()
+                       repo.write_config(config)
+
+               # This is plain text
+               self.set_header("Content-Type", "text/plain")
 
                # Send it to the client
-               self.finish(config)
+               config.write(self)
 
 
 class EditHandler(BaseHandler):