Commit 91ee7958 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

修改脚本适合融合环境

parent e33e0f35
...@@ -39,7 +39,11 @@ class FileUtils(object): ...@@ -39,7 +39,11 @@ class FileUtils(object):
def r_info2(self, module, keyname): def r_info2(self, module, keyname):
w_path = rootPath + os.sep + 'data' + os.sep + module w_path = rootPath + os.sep + 'data' + os.sep + module
yamlpath = os.path.join(w_path, "message2") yamlpath = os.path.join(w_path, "message2")
file_value = open(yamlpath, 'r', encoding='utf-8') try:
file_value = open(yamlpath, 'r', encoding='utf-8')
except:
file_value = open(yamlpath, 'w', encoding='utf-8')
file_value = open(yamlpath, 'r', encoding='utf-8')
result = yaml.load(file_value.read(), Loader=yaml.Loader) result = yaml.load(file_value.read(), Loader=yaml.Loader)
if result is not None: if result is not None:
key = keyname key = keyname
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment