This commit is contained in:
lan
2023-09-24 19:43:18 +08:00
parent 22c324ef21
commit 248541b2e7
+2
View File
@@ -62,6 +62,8 @@ class Settings:
return cls.__instance return cls.__instance
def __setattr__(self, key, value): def __setattr__(self, key, value):
if not key.startswith('opendal_') and type(value) == str and value.isnumeric():
value = int(value)
self.__dict__[key] = value self.__dict__[key] = value
with open(env_path, 'w', encoding='utf-8') as f: with open(env_path, 'w', encoding='utf-8') as f:
for key, value in self.__dict__.items(): for key, value in self.__dict__.items():