Improved behavior with large text in utils
This commit is contained in:
parent
76d7d7f4c6
commit
8601814642
@ -56,7 +56,11 @@ def configSet(key: str, value, *args: str, file: str = "config"):
|
||||
for arg in args:
|
||||
string += f'["{arg}"]'
|
||||
if type(value) in [str]:
|
||||
value.replace("'", "\'").replace('"', '\"')
|
||||
if len(value) < 30:
|
||||
string += f'["{key}"] = "{value}"'
|
||||
else:
|
||||
string += f'["{key}"] = """\n{value}\n"""'
|
||||
else:
|
||||
string += f'["{key}"] = {value}'
|
||||
exec(string)
|
||||
|
Reference in New Issue
Block a user