Commit 49f33c3b authored by xuezj's avatar xuezj

支持python2.7.5

parent e30d723b
# coding=UTF-8
from __future__ import print_function
import io
import yaml import yaml
import fileinput import fileinput
import os import os
...@@ -5,7 +8,7 @@ import os.path ...@@ -5,7 +8,7 @@ import os.path
import re import re
import copy import copy
f = open('replace_config.yaml', encoding='utf-8') f = io.open('replace_config.yaml', 'r', encoding='utf-8')
res = yaml.load(f) res = yaml.load(f)
print("全部配置信息:", res) print("全部配置信息:", res)
...@@ -35,11 +38,9 @@ def findFile (dir): ...@@ -35,11 +38,9 @@ def findFile (dir):
# 过滤符合要求的文件路径 # 过滤符合要求的文件路径
findFile(distPath) findFile(distPath)
# print(files)
# 替换文件中的内容 # 替换文件中的内容
for file in files: for file in files:
# print(file)
for line in fileinput.input(file, inplace = 1): for line in fileinput.input(file, inplace = 1):
for item in config: for item in config:
if not config[item]: if not config[item]:
......
...@@ -21,7 +21,7 @@ qgApiRule: &qgApiRule ...@@ -21,7 +21,7 @@ qgApiRule: &qgApiRule
useNamespace: true useNamespace: true
# todo: 看哪个项目需要 # todo: 看哪个项目需要
h5AuthRule: @h5AuthRule h5AuthRule: &h5AuthRule
reg: 'h5.auth.quantgroup.cn' reg: 'h5.auth.quantgroup.cn'
to: 'operator.liangkebang.com' to: 'operator.liangkebang.com'
# todo: quantgroup.cn # todo: quantgroup.cn
......
Markdown is supported
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