1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:44:45 +00:00

handle mandatory entries in config with toml

This commit is contained in:
deadc0de6
2022-03-12 15:40:24 +01:00
committed by deadc0de
parent fbde2e9716
commit 23a9a1f971

View File

@@ -28,7 +28,11 @@ def replace_None(content):
"""replace any occurence of None with empty string"""
n = {}
for k in content:
if not content[k]:
if content[k] is None:
if k == 'dotfiles':
continue
if k == 'profiles':
continue
n[k] = ""
continue
if isinstance(content[k], dict):
@@ -50,6 +54,7 @@ if __name__ == '__main__':
path = sys.argv[1]
content = yaml_load(path)
#print(content)
content = replace_None(content)
out = toml_dump(content)
print(out)