[Mod]2和3兼容性修改
This commit is contained in:
parent
e096455b44
commit
d3d1afd7c7
@ -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'测试完毕')
|
||||
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user