@@ -85,7 +85,7 @@ def spawn(self, sh, escape, cmd, args, env):
8585 try :
8686 os .remove (f )
8787 except Exception as e :
88- print ('Error removing file: ' + e )
88+ print ('Error removing file: ' + e )
8989 return - 1
9090 return 0
9191
@@ -106,8 +106,8 @@ def spawn(self, sh, escape, cmd, args, env):
106106 try :
107107 proc = subprocess .Popen (cmdline , env = _e , shell = False )
108108 except Exception as e :
109- print ('Error in calling command:' + cmdline .split (' ' )[0 ])
110- print ('Exception: ' + os .strerror (e .errno ))
109+ print ('Error in calling command:' + cmdline .split (' ' )[0 ])
110+ print ('Exception: ' + os .strerror (e .errno ))
111111 if (os .strerror (e .errno ) == "No such file or directory" ):
112112 print ("\n Please check Toolchains PATH setting.\n " )
113113
@@ -274,7 +274,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
274274 os .environ ['RTT_CC' ] = rtconfig .CROSS_TOOL
275275 utils .ReloadModule (rtconfig )
276276 except KeyError :
277- print ('Unknow target: ' + tgt_name + '. Avaible targets: ' + ', ' .join (tgt_dict .keys ()))
277+ print ('Unknow target: ' + tgt_name + '. Avaible targets: ' + ', ' .join (tgt_dict .keys ()))
278278 sys .exit (1 )
279279
280280 # auto change the 'RTT_EXEC_PATH' when 'rtconfig.EXEC_PATH' get failed
@@ -662,7 +662,7 @@ def DefineGroup(name, src, depend, **parameters):
662662 # check whether to clean up library
663663 if GetOption ('cleanlib' ) and os .path .exists (os .path .join (group ['path' ], GroupLibFullName (name , Env ))):
664664 if group ['src' ] != []:
665- print ('Remove library:' + GroupLibFullName (name , Env ))
665+ print ('Remove library:' + GroupLibFullName (name , Env ))
666666 fn = os .path .join (group ['path' ], GroupLibFullName (name , Env ))
667667 if os .path .exists (fn ):
668668 os .unlink (fn )
@@ -735,7 +735,7 @@ def BuildLibInstallAction(target, source, env):
735735 if Group ['name' ] == lib_name :
736736 lib_name = GroupLibFullName (Group ['name' ], env )
737737 dst_name = os .path .join (Group ['path' ], lib_name )
738- print ('Copy ' + lib_name + ' => ' + dst_name )
738+ print ('Copy ' + lib_name + ' => ' + dst_name )
739739 do_copy_file (lib_name , dst_name )
740740 break
741741
@@ -996,11 +996,11 @@ def GetVersion():
996996 prepcessor .process_contents (contents )
997997 def_ns = prepcessor .cpp_namespace
998998
999- version = int (filter ( lambda ch : ch in '0123456789.' , def_ns ['RT_VERSION' ]) )
1000- subversion = int (filter ( lambda ch : ch in '0123456789.' , def_ns ['RT_SUBVERSION' ]) )
999+ version = int ([ ch for ch in def_ns ['RT_VERSION' ] if ch in '0123456789.' ] )
1000+ subversion = int ([ ch for ch in def_ns ['RT_SUBVERSION' ] if ch in '0123456789.' ] )
10011001
10021002 if 'RT_REVISION' in def_ns :
1003- revision = int (filter ( lambda ch : ch in '0123456789.' , def_ns ['RT_REVISION' ]) )
1003+ revision = int ([ ch for ch in def_ns ['RT_REVISION' ] if ch in '0123456789.' ] )
10041004 return '%d.%d.%d' % (version , subversion , revision )
10051005
10061006 return '0.%d.%d' % (version , subversion )
0 commit comments