Andrew Bogott has submitted this change and it was merged.

Change subject: Puppet Panel:  Don't choke on a (user-provided) "" hiera string.
......................................................................


Puppet Panel:  Don't choke on a (user-provided) "" hiera string.

Bug: T91990
Change-Id: If842893fe08099bd98493bb46f3bf46afe04d529
---
M modules/openstack/files/liberty/horizon/puppettab/puppet_config.py
1 file changed, 4 insertions(+), 0 deletions(-)

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 fc24d8d..6447066 100644
--- a/modules/openstack/files/liberty/horizon/puppettab/puppet_config.py
+++ b/modules/openstack/files/liberty/horizon/puppettab/puppet_config.py
@@ -148,6 +148,10 @@
         self.refresh()
 
     def set_hiera(self, hiera_yaml):
+        if not hiera_yaml:
+            # The user probably cleared the field.  That's fine, we'll just
+            #  convert that to {}
+            hiera_yaml = {}
         hiera_dump = yaml.safe_dump(hiera_yaml, default_flow_style=False)
         hieraurl = "%s/%s/prefix/%s/hiera" % (self.apiurl,
                                               self.tenant_id,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If842893fe08099bd98493bb46f3bf46afe04d529
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