Skip to content

Commit ed6a53b

Browse files
committed
Made cli arguments with dashes work
1 parent d89a8d3 commit ed6a53b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pythonforandroid/toolchain.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,17 @@ def __init__(self):
330330
# 'handled, exiting.')
331331
# exit(1)
332332

333-
if not hasattr(self, args.command):
333+
command_method_name = args.command.replace('-', '_')
334+
335+
if not hasattr(self, command_method_name):
334336
print('Unrecognized command')
335337
parser.print_help()
336338
exit(1)
337339

338340
self.ctx.local_recipes = args.local_recipes
339341
self.ctx.copy_libs = args.copy_libs
340342

341-
getattr(self, args.command)(unknown)
343+
getattr(self, command_method_name)(unknown)
342344

343345
@property
344346
def default_storage_dir(self):

0 commit comments

Comments
 (0)