diff options
| author | Bernard Xiong <[email protected]> | 2018-11-10 18:54:25 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-11-10 18:54:25 +0800 |
| commit | 5ab775ee2a97a0e4f6c41da3fddaa4a7463e3e96 (patch) | |
| tree | 9cc245aaba0206a9dfe72c025a2fc15fca7400b3 /tools/codeblocks.py | |
| parent | 02f006d83f4438e209fdff4327037869787ec72d (diff) | |
| parent | d687cfb22841ba0e1ccf4c946f672dfaeae239cb (diff) | |
Merge pull request #1965 from RT-Thread/fix_py3
[Tools] Change building script for Py3
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: |
