[Mod]2和3兼容性修改

This commit is contained in:
vn.py 2017-12-01 09:29:48 +08:00
parent e096455b44
commit d3d1afd7c7
2 changed files with 3 additions and 3 deletions

View File

@ -34,8 +34,8 @@ def test():
if len(value)>1:
print(u'存在重复的常量定义:{}'.format(str(key)))
for name in value:
print name
print ''
print(name)
print('')
print(u'测试完毕')

View File

@ -16,7 +16,7 @@ settingFilePath = getJsonPath(settingFileName, __file__)
globalSetting = {} # 全局配置字典
try:
with open(settingFilePath) as f:
with open(settingFilePath, 'rb') as f:
setting = f.read()
if type(setting) is not str:
setting = str(setting, encoding='utf8')