[omd-commits] OMD Git: omd: Minor cleanup: Saving keys in site.conf sorted

git version control git at mathias-kettner.de
Thu May 19 17:36:41 CEST 2016


Module:   omd
Branch:   master
Commit:   fec42ce255fcede0e279f08f6bf229245b3b4540
URL:      http://omdistro.org/projects/omd/repository/revisions/fec42ce255fcede0e279f08f6bf229245b3b4540

Author:   Lars Michelsen <lm at larsmichelsen.com>
Date:     Thu May 19 17:33:59 2016 +0200
Commiter: Lars Michelsen <lm at larsmichelsen.com>
Date:     Thu May 19 17:33:59 2016 +0200

Minor cleanup: Saving keys in site.conf sorted

---

 packages/omd/omd |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/packages/omd/omd b/packages/omd/omd
index 93994a2..7ec7e42 100644
--- a/packages/omd/omd
+++ b/packages/omd/omd
@@ -1789,10 +1789,13 @@ def create_config_environment():
 # TODO: RENAME
 def save_site_conf():
     confdir = g_sitedir + "/etc/omd"
+
     if not os.path.exists(confdir):
         os.mkdir(confdir)
+
     f = file(g_sitedir + "/etc/omd/site.conf", "w")
-    for hook_name, value in g_site_conf.items():
+
+    for hook_name, value in sorted(g_site_conf.items(), key=lambda x: x[0]):
         f.write("CONFIG_%s='%s'\n" % (hook_name, value))
 
 



More information about the omd-commits mailing list