1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-01-22 18:04:09 +03:00

Added handling of quotation marks in Preference values

This commit is contained in:
Maria Alexeeva 2024-09-27 13:16:18 +04:00
parent 862b3b358b
commit 8a2c9554f7

View File

@ -26,6 +26,10 @@ class DynamicAttributes:
def __setattr__(self, key, value):
if isinstance(value, Enum):
value = str(value)
if isinstance(value, str):
for q in ["'", "\""]:
if any(q in ch for ch in value):
value = value.replace(q, "")
self.__dict__[key] = value
def items(self):