cli: update set_or_update_a_value

This commit is contained in:
Sina Atalay
2024-07-16 15:43:16 +03:00
parent 31046aec90
commit 905053a921

View File

@@ -63,7 +63,8 @@ def set_or_update_a_value(
if len(keys) == 1:
# Set the value:
if value.startswith("{") and value.endswith("}"):
raise ValueError("Dictionary assignment is not allowed!")
# Allow users to assign dictionaries:
value = eval(value)
elif value.startswith("[") and value.endswith("]"):
# Allow users to assign lists:
value = eval(value)