diff options
| author | Bernard Xiong <[email protected]> | 2018-11-20 23:13:45 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-11-20 23:13:45 +0800 |
| commit | 46dae3f35f5cc44664a26ebd87803156033a166a (patch) | |
| tree | 47f132d0a7472768deabd2add67d990c0c6e64e7 /tools/codeblocks.py | |
| parent | b31888de49408b212d2aeab4b40b2a672b958313 (diff) | |
| parent | 6b6d122e3673ca64d2171d3daf1ae940edfa699a (diff) | |
Merge branch 'master' into dev-4.0.x
Diffstat (limited to 'tools/codeblocks.py')
| -rw-r--r-- | tools/codeblocks.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/codeblocks.py b/tools/codeblocks.py index c45a5dca91..6334f9b7cd 100644 --- a/tools/codeblocks.py +++ b/tools/codeblocks.py @@ -73,7 +73,7 @@ def CBProject(target, script, program): root = tree.getroot() - out = file(target, 'wb') + out = open(target, 'w') out.write('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\n') ProjectFiles = [] @@ -90,7 +90,7 @@ def CBProject(target, script, program): # SECTION 2. # write head include path - if building.Env.has_key('CPPPATH'): + if 'CPPPATH' in building.Env: cpp_path = building.Env['CPPPATH'] paths = set() for path in cpp_path: @@ -114,7 +114,7 @@ def CBProject(target, script, program): # write link flags ''' # write lib dependence - if building.Env.has_key('LIBS'): + if 'LIBS' in building.Env: for elem in tree.iter(tag='Tool'): if elem.attrib['Name'] == 'VCLinkerTool': break @@ -123,7 +123,7 @@ def CBProject(target, script, program): elem.set('AdditionalDependencies', libs) # write lib include path - if building.Env.has_key('LIBPATH'): + if 'LIBPATH' in building.Env: lib_path = building.Env['LIBPATH'] paths = set() for path in lib_path: |
