@@ -843,13 +843,13 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
843
843
exit (1 )
844
844
845
845
toolchain_versions = []
846
- toolchain_path = join ( self .ndk_dir , 'toolchains' )
846
+ toolchain_path = join (self .ndk_dir , 'toolchains' )
847
847
if os .path .isdir (toolchain_path ):
848
848
toolchain_contents = os .listdir (toolchain_path )
849
849
for toolchain_content in toolchain_contents :
850
850
if toolchain_content .startswith (toolchain_prefix ) and os .path .isdir (os .path .join (toolchain_path , toolchain_content )):
851
851
toolchain_version = toolchain_content [len (toolchain_prefix )+ 1 :]
852
- debug (" Found toolchain version: %s" % (toolchain_version ))
852
+ debug (' Found toolchain version: {}' . format (toolchain_version ))
853
853
toolchain_versions .append (toolchain_version )
854
854
else :
855
855
warning ('Could not find toolchain subdirectory!' )
@@ -862,11 +862,11 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
862
862
toolchain_versions_gcc .append (toolchain_version )
863
863
864
864
if toolchain_versions :
865
- info ('Found the following toolchain versions: %s' % ( repr ( toolchain_versions ) ))
866
- info ('Picking the latest gcc toolchain, here %s' % ( repr ( toolchain_versions_gcc [- 1 ]) ))
865
+ info ('Found the following toolchain versions: {}' . format ( toolchain_versions ))
866
+ info ('Picking the latest gcc toolchain, here {}' . format ( toolchain_versions_gcc [- 1 ]))
867
867
toolchain_version = toolchain_versions_gcc [- 1 ]
868
868
else :
869
- warning ('Could not find any toolchain for %s!' % (toolchain_prefix ))
869
+ warning ('Could not find any toolchain for {}!' . format (toolchain_prefix ))
870
870
ok = False
871
871
872
872
self .toolchain_prefix = toolchain_prefix
@@ -2854,17 +2854,18 @@ def build_status(self, args):
2854
2854
2855
2855
print ('{Style.BRIGHT}Recipes that are probably already built:'
2856
2856
'{Style.RESET_ALL}' .format (Style = Style ))
2857
- for filen in sorted (os .listdir (join (self .ctx .build_dir , 'other_builds' ))):
2858
- name = filen .split ('-' )[0 ]
2859
- dependencies = filen .split ('-' )[1 :]
2860
- recipe_str = (' {Style.BRIGHT}{Fore.GREEN}{name}'
2861
- '{Style.RESET_ALL}' .format (
2862
- Style = Style , name = name , Fore = Fore ))
2863
- if dependencies :
2864
- recipe_str += (' ({Fore.BLUE}with ' + ', ' .join (dependencies ) +
2865
- '){Fore.RESET}' ).format (Fore = Fore )
2866
- recipe_str += '{Style.RESET_ALL}' .format (Style = Style )
2867
- print (recipe_str )
2857
+ if exists (join (self .ctx .build_dir , 'other_builds' )):
2858
+ for filen in sorted (os .listdir (join (self .ctx .build_dir , 'other_builds' ))):
2859
+ name = filen .split ('-' )[0 ]
2860
+ dependencies = filen .split ('-' )[1 :]
2861
+ recipe_str = (' {Style.BRIGHT}{Fore.GREEN}{name}'
2862
+ '{Style.RESET_ALL}' .format (
2863
+ Style = Style , name = name , Fore = Fore ))
2864
+ if dependencies :
2865
+ recipe_str += (' ({Fore.BLUE}with ' + ', ' .join (dependencies ) +
2866
+ '){Fore.RESET}' ).format (Fore = Fore )
2867
+ recipe_str += '{Style.RESET_ALL}' .format (Style = Style )
2868
+ print (recipe_str )
2868
2869
2869
2870
2870
2871
def main ():
0 commit comments