Skip to content

Commit 260ff87

Browse files
committed
always create a context
1 parent 23a969b commit 260ff87

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pythonforandroid/toolchain.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ def split_argument_list(l):
171171
class ToolchainCL(object):
172172

173173
def __init__(self):
174-
self._ctx = None
175-
176174
parser = argparse.ArgumentParser(
177175
description="Tool for managing the Android / Python toolchain",
178176
usage="""toolchain <command> [<args>]
@@ -296,6 +294,8 @@ def __init__(self):
296294

297295
if args.debug:
298296
logger.setLevel(logging.DEBUG)
297+
298+
self.ctx = Context()
299299
self.storage_dir = args.storage_dir
300300
self.ctx.setup_dirs(self.storage_dir)
301301
self.sdk_dir = args.sdk_dir
@@ -349,12 +349,6 @@ def _read_configuration(self):
349349
for arg in line:
350350
sys.argv.append(arg)
351351

352-
@property
353-
def ctx(self):
354-
if self._ctx is None:
355-
self._ctx = Context()
356-
return self._ctx
357-
358352
def recipes(self, args):
359353
parser = argparse.ArgumentParser(
360354
description="List all the available recipes")

0 commit comments

Comments
 (0)