mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-24 21:08:30 +00:00
perf: 完善 yaml 加载
This commit is contained in:
@@ -12,7 +12,7 @@ def translate(key, i18n, lang):
|
||||
return lang_data.get(lang, key)
|
||||
|
||||
|
||||
def yaml_load_with_i18n(stream, lang):
|
||||
def yaml_load_with_i18n(stream, lang=None):
|
||||
ori_text = stream.read()
|
||||
stream = io.StringIO(ori_text)
|
||||
yaml_data = yaml.safe_load(stream)
|
||||
|
Reference in New Issue
Block a user