@@ -560,11 +560,13 @@ def clean_dists(self, args):
560
560
561
561
def clean_bootstrap_builds (self , args ):
562
562
'''Delete all the bootstrap builds.'''
563
- for bs in Bootstrap .list_bootstraps ():
564
- bs = Bootstrap .get_bootstrap (bs , self .ctx )
565
- if bs .build_dir and exists (bs .build_dir ):
566
- info ('Cleaning build for {} bootstrap.' .format (bs .name ))
567
- shutil .rmtree (bs .build_dir )
563
+ if exists (join (self .ctx .build_dir , 'bootstrap_builds' )):
564
+ shutil .rmtree (join (self .ctx .build_dir , 'bootstrap_builds' ))
565
+ # for bs in Bootstrap.list_bootstraps():
566
+ # bs = Bootstrap.get_bootstrap(bs, self.ctx)
567
+ # if bs.build_dir and exists(bs.build_dir):
568
+ # info('Cleaning build for {} bootstrap.'.format(bs.name))
569
+ # shutil.rmtree(bs.build_dir)
568
570
569
571
def clean_builds (self , args ):
570
572
'''Delete all build caches for each recipe, python-install, java code
@@ -610,7 +612,7 @@ def clean_download_cache(self, args):
610
612
This does *not* delete the build caches or final distributions.
611
613
'''
612
614
ctx = self .ctx
613
- if args .recipes :
615
+ if hasattr ( args , 'recipes' ) and args .recipes :
614
616
for package in args .recipes :
615
617
remove_path = join (ctx .packages_path , package )
616
618
if exists (remove_path ):
0 commit comments