mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-22 17:51:29 +03:00
Keep keys missing from source, but move to end of file and print warning
This commit is contained in:
parent
372747f0dd
commit
e2856eddf3
@ -45,6 +45,12 @@ def equalize_key_order(source, target):
|
||||
target_result[key] = source[key]
|
||||
else:
|
||||
target_result[key] = None
|
||||
|
||||
for key in target.keys():
|
||||
if key not in target_result:
|
||||
print(f"WARNING: Key not present in source; moving to end of file: {key}")
|
||||
target_result[key] = target[key]
|
||||
|
||||
return target_result
|
||||
|
||||
elif isinstance(source, list) and isinstance(target, list):
|
||||
|
Loading…
Reference in New Issue
Block a user