Andrew Bogott has submitted this change and it was merged.

Change subject: Puppet panel: Use "{}" to represent an empty hiera config
......................................................................


Puppet panel: Use "{}" to represent an empty hiera config

We were using "" in some cases before, which wound up unparsable
down the line.

Bug: T91990
Change-Id: I1e3886270ef5a14d1073aac7e2fa80b6271fa2ff
---
M modules/openstack/files/liberty/horizon/puppettab/puppet_config.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/openstack/files/liberty/horizon/puppettab/puppet_config.py 
b/modules/openstack/files/liberty/horizon/puppettab/puppet_config.py
index a43e814..fc24d8d 100644
--- a/modules/openstack/files/liberty/horizon/puppettab/puppet_config.py
+++ b/modules/openstack/files/liberty/horizon/puppettab/puppet_config.py
@@ -53,7 +53,8 @@
                                               self.prefix)
         req = requests.get(hieraurl, verify=False)
         if req.status_code == 404:
-            self.hiera_raw = ""
+            # Missing is the same as empty
+            self.hiera_raw = "{}"
         else:
             req.raise_for_status()
             self.hiera_raw = yaml.safe_load(req.text)['hiera']

-- 
To view, visit https://gerrit.wikimedia.org/r/311486
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e3886270ef5a14d1073aac7e2fa80b6271fa2ff
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <abog...@wikimedia.org>
Gerrit-Reviewer: Alex Monk <a...@wikimedia.org>
Gerrit-Reviewer: Andrew Bogott <abog...@wikimedia.org>
Gerrit-Reviewer: Volans <rcocci...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to