@@ -195,9 +195,9 @@ def tryint(key):
195
195
196
196
# Get the CONFIG_EXPORT value and do an extended dump if > 100
197
197
# For example, CONFIG_EXPORT 102 will make a 'config.ini' with a [config:] group for each schema @section
198
- config_dump = tryint ('CONFIG_EXPORT' )
198
+ config_dump = 101 if is_embed else tryint ('CONFIG_EXPORT' )
199
199
extended_dump = config_dump > 100
200
- if extended_dump : config_dump - = 100
200
+ config_dump % = 100
201
201
202
202
# Get the schema class for exports that require it
203
203
if config_dump in (3 , 4 ) or (extended_dump and config_dump in (2 , 5 )):
@@ -451,7 +451,7 @@ def optsort(x, optorder):
451
451
# Produce a JSON file for CONFIGURATION_EMBEDDING or CONFIG_EXPORT == 1 or 101
452
452
# Skip if an identical JSON file was already present.
453
453
#
454
- if not same_hash and ( config_dump == 1 or is_embed ) :
454
+ if not same_hash and config_dump == 1 :
455
455
with marlin_json .open ('w' ) as outfile :
456
456
457
457
json_data = {}
@@ -468,12 +468,11 @@ def optsort(x, optorder):
468
468
json_data [header ][s ][name ] = c ['value' ]
469
469
else :
470
470
for header in real_config :
471
- json_data [header ] = {}
472
471
conf = real_config [header ]
473
472
#print(f"real_config[{header}]", conf)
474
473
for name in conf :
475
474
if name in ignore : continue
476
- json_data [header ][ name ] = conf [name ]['value' ]
475
+ json_data [name ] = conf [name ]['value' ]
477
476
478
477
json_data ['__INITIAL_HASH' ] = hashes
479
478
0 commit comments