File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
pythonforandroid/bootstraps Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ def parse_args(args=None):
415415 'Usually one of "landscape", "portrait" or '
416416 '"sensor"' ))
417417 ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' ,
418- help = 'The permissions to give this app.' )
418+ help = 'The permissions to give this app.' , nargs = '+' )
419419 ap .add_argument ('--ignore-path' , dest = 'ignore_path' , action = 'append' ,
420420 help = 'Ignore path when building the app' )
421421 ap .add_argument ('--icon' , dest = 'icon' ,
@@ -488,6 +488,9 @@ def parse_args(args=None):
488488
489489 if args .permissions is None :
490490 args .permissions = []
491+ elif args .permissions :
492+ if isinstance (args .permissions [0 ], list ):
493+ args .permissions = [p for perm in args .permissions for p in perm ]
491494
492495 if args .ignore_path is None :
493496 args .ignore_path = []
Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ def parse_args(args=None):
417417 ap .add_argument ('--icon' , dest = 'icon' ,
418418 help = 'A png file to use as the icon for the application.' )
419419 ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' ,
420- help = 'The permissions to give this app.' )
420+ help = 'The permissions to give this app.' , nargs = '+' )
421421 ap .add_argument ('--meta-data' , dest = 'meta_data' , action = 'append' ,
422422 help = 'Custom key=value to add in application metadata' )
423423 ap .add_argument ('--presplash' , dest = 'presplash' ,
@@ -488,6 +488,9 @@ def parse_args(args=None):
488488
489489 if args .permissions is None :
490490 args .permissions = []
491+ elif args .permissions :
492+ if isinstance (args .permissions [0 ], list ):
493+ args .permissions = [p for perm in args .permissions for p in perm ]
491494
492495 if args .meta_data is None :
493496 args .meta_data = []
Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ def parse_args(args=None):
404404 ap .add_argument ('--icon' , dest = 'icon' ,
405405 help = 'A png file to use as the icon for the application.' )
406406 ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' ,
407- help = 'The permissions to give this app.' )
407+ help = 'The permissions to give this app.' , nargs = '+' )
408408 ap .add_argument ('--meta-data' , dest = 'meta_data' , action = 'append' ,
409409 help = 'Custom key=value to add in application metadata' )
410410 ap .add_argument ('--presplash' , dest = 'presplash' ,
@@ -465,6 +465,9 @@ def parse_args(args=None):
465465
466466 if args .permissions is None :
467467 args .permissions = []
468+ elif args .permissions :
469+ if isinstance (args .permissions [0 ], list ):
470+ args .permissions = [p for perm in args .permissions for p in perm ]
468471
469472 if args .meta_data is None :
470473 args .meta_data = []
You can’t perform that action at this time.
0 commit comments