Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
# #
###############################################################################
+import configparser
import tornado.web
from . import base
# 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):