Browse Source

🔨 Fix config.ini custom items, and 'all' (#24720)

FB4S_WIFI^2^2
ButchMonkey 2 years ago
committed by Scott Lahteine
parent
commit
cc2cc7d081
  1. 14
      buildroot/share/PlatformIO/scripts/configuration.py

14
buildroot/share/PlatformIO/scripts/configuration.py

@ -78,8 +78,8 @@ def apply_opt(name, val, conf=None):
elif not isdef:
break
linenum += 1
lines.insert(linenum, f"{prefix}#define {added} // Added by config.ini\n")
fullpath.write_text('\n'.join(lines), encoding='utf-8')
lines.insert(linenum, f"{prefix}#define {added:30} // Added by config.ini\n")
fullpath.write_text(''.join(lines), encoding='utf-8')
# Fetch configuration files from GitHub given the path.
# Return True if any files were fetched.
@ -127,7 +127,7 @@ def apply_ini_by_name(cp, sect):
iniok = False
items = section_items(cp, 'config:base') + section_items(cp, 'config:root')
else:
items = cp.items(sect)
items = section_items(cp, sect)
for item in items:
if iniok or not item[0].startswith('ini_'):
@ -195,8 +195,12 @@ def apply_config_ini(cp):
fetch_example(ckey)
ckey = 'base'
# Apply keyed sections after external files are done
apply_sections(cp, 'config:' + ckey)
elif ckey == 'all':
apply_sections(cp)
else:
# Apply keyed sections after external files are done
apply_sections(cp, 'config:' + ckey)
if __name__ == "__main__":
#

Loading…
Cancel
Save