feat: + safe code

This commit is contained in:
莘权 马 2023-08-29 16:32:37 +08:00
parent 14068cdc19
commit 9da450f8a7

View file

@ -131,6 +131,8 @@ class Config(metaclass=Singleton):
def set_context(self, options: dict):
"""Update current config"""
if not options:
return
opts = deepcopy(OPTIONS.get())
opts.update(options)
OPTIONS.set(opts)