components/openstack/common/files/openstack_common.py
changeset 5405 66fd59fecd68
parent 4351 c3f50d5f75d2
child 6031 1aaf20a19738
child 7319 0753ecc76d4d
equal deleted inserted replaced
5404:55e409ba4e72 5405:66fd59fecd68
   151                 # no deprecated values for this file so just copy the values
   151                 # no deprecated values for this file so just copy the values
   152                 # over
   152                 # over
   153                 new_section, new_key = old_section, old_key
   153                 new_section, new_key = old_section, old_key
   154 
   154 
   155             # Look for exceptions
   155             # Look for exceptions
   156             if exception_list is not None:
   156             if exception_list:
   157                 if (new_section, new_key) in exception_list:
   157                 if (new_section, new_key) in exception_list:
   158                     if (new_section != 'DEFAULT' and
   158                     if (new_section != 'DEFAULT' and
   159                         not new.has_section(new_section)):
   159                             not new.has_section(new_section)):
   160                         new.add_section(new_section)
   160                         new.add_section(new_section)
   161                     print "Preserving [%s] %s = %s" % \
   161                     print "Preserving [%s] %s = %s" % \
   162                         (new_section, new_key, value)
   162                         (new_section, new_key, value)
   163                     new.set(new_section, new_key, value)
   163                     new.set(new_section, new_key, value)
   164                     continue
   164                     continue