From ec3b17159c4488f7475aabc842343a2d5989a84b Mon Sep 17 00:00:00 2001 From: nocarryr Date: Sat, 30 Jul 2016 20:36:20 -0500 Subject: [PATCH] Check if bdist_dir exists before removing --- pythonforandroid/bdistapk.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pythonforandroid/bdistapk.py b/pythonforandroid/bdistapk.py index a87fc76c20..9358b382ab 100644 --- a/pythonforandroid/bdistapk.py +++ b/pythonforandroid/bdistapk.py @@ -87,7 +87,8 @@ def prepare_build_dir(self): 'that.') bdist_dir = 'build/bdist.android-{}'.format(self.arch) - rmtree(bdist_dir) + if exists(bdist_dir): + rmtree(bdist_dir) makedirs(bdist_dir) globs = []