summaryrefslogtreecommitdiff
path: root/tools/cdk.py
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-11-10 18:29:08 +0800
committerBernard Xiong <[email protected]>2018-11-10 18:29:08 +0800
commitd687cfb22841ba0e1ccf4c946f672dfaeae239cb (patch)
treeaf7d6547eef20e642e1230c141585507f839924e /tools/cdk.py
parentb69baa965809420fc3fcd19dd55fc1126a68c08d (diff)
[Tools] Change building script for Py3
Diffstat (limited to 'tools/cdk.py')
-rw-r--r--tools/cdk.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/cdk.py b/tools/cdk.py
index 8f995981aa..09ac934ad3 100644
--- a/tools/cdk.py
+++ b/tools/cdk.py
@@ -56,7 +56,7 @@ def _CDKProject(tree, target, script):
project_path = os.path.dirname(os.path.abspath(target))
root = tree.getroot()
- out = file(target, 'wb')
+ out = open(target, 'w')
out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
CPPPATH = []
@@ -73,28 +73,28 @@ def _CDKProject(tree, target, script):
group_tree = SDKAddGroup(ProjectFiles, root, group['name'], group['src'], project_path)
# get each include path
- if group.has_key('CPPPATH') and group['CPPPATH']:
+ if 'CPPPATH' in group and group['CPPPATH']:
if CPPPATH:
CPPPATH += group['CPPPATH']
else:
CPPPATH += group['CPPPATH']
# get each group's definitions
- if group.has_key('CPPDEFINES') and group['CPPDEFINES']:
+ if 'CPPDEFINES' in group and group['CPPDEFINES']:
if CPPDEFINES:
CPPDEFINES += group['CPPDEFINES']
else:
CPPDEFINES += group['CPPDEFINES']
# get each group's cc flags
- if group.has_key('CCFLAGS') and group['CCFLAGS']:
+ if 'CCFLAGS' in group and group['CCFLAGS']:
if CCFLAGS:
CCFLAGS += ' ' + group['CCFLAGS']
else:
CCFLAGS += group['CCFLAGS']
# get each group's link flags
- if group.has_key('LINKFLAGS') and group['LINKFLAGS']:
+ if 'LINKFLAGS' in group and group['LINKFLAGS']:
if LINKFLAGS:
LINKFLAGS += ' ' + group['LINKFLAGS']
else: