Skip to content

Commit 1f4e99f

Browse files
committed
Fixed clean_bootstrap_builds
1 parent c707e07 commit 1f4e99f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pythonforandroid/toolchain.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,13 @@ def clean_dists(self, args):
560560

561561
def clean_bootstrap_builds(self, args):
562562
'''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)
568570

569571
def clean_builds(self, args):
570572
'''Delete all build caches for each recipe, python-install, java code
@@ -610,7 +612,7 @@ def clean_download_cache(self, args):
610612
This does *not* delete the build caches or final distributions.
611613
'''
612614
ctx = self.ctx
613-
if args.recipes:
615+
if hasattr(args, 'recipes') and args.recipes:
614616
for package in args.recipes:
615617
remove_path = join(ctx.packages_path, package)
616618
if exists(remove_path):

0 commit comments

Comments
 (0)