1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Removing an empty key in a dictionary

This commit is contained in:
Данила Скачедубов 2024-01-22 15:56:43 +04:00 committed by Valery Sinelnikov
parent 62ed015ea9
commit 1e267f5cb6

View File

@ -164,6 +164,9 @@ def dict_item_to_list(dictionary:dict) -> dict:
'''
Replacing dictionaries with numeric keys with a List
'''
if '' in dictionary:
dictionary = dictionary.pop('')
for key,val in dictionary.items():
if type(val) == dict:
if key_dict_is_digit(val):