launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32628
[Merge] ~ruinedyourlife/launchpad:fix-native-publisher-json-module into launchpad:master
Quentin Debhi has proposed merging ~ruinedyourlife/launchpad:fix-native-publisher-json-module into launchpad:master.
Commit message:
Add json module available in the template context
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ruinedyourlife/launchpad/+git/launchpad/+merge/487572
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ruinedyourlife/launchpad:fix-native-publisher-json-module into launchpad:master.
diff --git a/charm/launchpad-native-publisher/reactive/launchpad-native-publisher.py b/charm/launchpad-native-publisher/reactive/launchpad-native-publisher.py
index c5e8ab3..cdb7ce8 100644
--- a/charm/launchpad-native-publisher/reactive/launchpad-native-publisher.py
+++ b/charm/launchpad-native-publisher/reactive/launchpad-native-publisher.py
@@ -1,6 +1,7 @@
# Copyright 2025 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
+import json
import subprocess
import yaml
@@ -110,6 +111,9 @@ def configure():
config["craftbuild_config"] = {}
hookenv.log(f"Error parsing craftbuild_config: {e}", level="ERROR")
+ # Make json module available in templates
+ config["json"] = json
+
configure_lazr(
config,
"launchpad-native-publisher-lazr.conf.j2",