pvl.hosts.config: fix handling of mixed boot=... boot.foo=... independent of dict ordering
authorTero Marttila <tero.marttila@aalto.fi>
Mon, 02 Mar 2015 18:08:30 +0200
changeset 690 517527835381
parent 689 c258e3ff6d32
child 691 760bab5a959f
pvl.hosts.config: fix handling of mixed boot=... boot.foo=... independent of dict ordering
pvl/hosts/config.py
--- a/pvl/hosts/config.py	Mon Mar 02 17:58:24 2015 +0200
+++ b/pvl/hosts/config.py	Mon Mar 02 18:08:30 2015 +0200
@@ -119,6 +119,8 @@
         else:
             f = fields
 
+        log.debug("%s@%s: %s:%s.%s = %r", name, domain, extension, field, instance, value)
+
         if instance:
             if field not in f:
                 f[field] = { }
@@ -127,6 +129,8 @@
                 f[field] = {None: f[field]}
             
             f[field][instance] = value
+        elif field in f:
+            f[field][None] = value
         else:
             f[field] = value