mirror of
https://github.com/RGBCube/JsonWrapper
synced 2025-07-27 19:57:44 +00:00
huge mistake reverted & no exec
This commit is contained in:
parent
c06b88c1a0
commit
6c23b42f71
1 changed files with 5 additions and 6 deletions
11
db.py
11
db.py
|
@ -20,13 +20,12 @@ class Utils:
|
||||||
else:
|
else:
|
||||||
alt_dict[key] = {}
|
alt_dict[key] = {}
|
||||||
return alt_dict
|
return alt_dict
|
||||||
exec_str = "main_dict"
|
main_dict_ref = main_dict
|
||||||
for dict_name in path.split("+"):
|
for dict_name in path.split("+"):
|
||||||
exec_str = f"magic({exec_str}, '{dict_name}')['{dict_name}']"
|
main_dict = magic(main_dict, dict_name)[dict_name]
|
||||||
if path.index(dict_name) == len(path) - 1:
|
if path.split("+").index(dict_name) == len(path.split("+")) - 1:
|
||||||
exec_str = f"{exec_str}['{key}'] = {value}"
|
main_dict[key] = value
|
||||||
exec(exec_str)
|
return main_dict_ref
|
||||||
return main_dict
|
|
||||||
|
|
||||||
class ClutterDB:
|
class ClutterDB:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue