diff options
| author | Bernard Xiong <[email protected]> | 2018-11-10 18:29:08 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2018-11-10 18:29:08 +0800 |
| commit | d687cfb22841ba0e1ccf4c946f672dfaeae239cb (patch) | |
| tree | af7d6547eef20e642e1230c141585507f839924e /tools/sconsui.py | |
| parent | b69baa965809420fc3fcd19dd55fc1126a68c08d (diff) | |
[Tools] Change building script for Py3
Diffstat (limited to 'tools/sconsui.py')
| -rw-r--r-- | tools/sconsui.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/sconsui.py b/tools/sconsui.py index 3542c36278..cd623f7fb5 100644 --- a/tools/sconsui.py +++ b/tools/sconsui.py @@ -198,7 +198,7 @@ class SconsUI(): setting_path = os.path.join(home, '.rtt_scons') if os.path.exists(setting_path): - setting = file(os.path.join(home, '.rtt_scons')) + setting = open(os.path.join(home, '.rtt_scons')) for line in setting: line = line.replace('\n', '') line = line.replace('\r', '') @@ -215,7 +215,7 @@ class SconsUI(): setting.close() # set RT-Thread Root Directory according environ - if os.environ.has_key('RTT_ROOT'): + if 'RTT_ROOT' in os.environ: self.RTTRoot.set_path(os.environ['RTT_ROOT']) if self.RTTRoot.get_path() == '': @@ -268,7 +268,7 @@ class SconsUI(): else: home = os.environ['HOME'] - setting = file(os.path.join(home, '.rtt_scons'), 'wb+') + setting = open(os.path.join(home, '.rtt_scons'), 'w+') # current comiler # line = '%s=%s\n' % ('compiler', self.compilers.get())) line = '%s=%s\n' % ('compiler', 'iar') |
