Skip to content

Commit d356876

Browse files
committed
Restore service argument
¡¡¡Thanks @KeyWeeUsr!!!
1 parent 5fb6684 commit d356876

File tree

1 file changed

+4
-5
lines changed
  • pythonforandroid/bootstraps/common/build

1 file changed

+4
-5
lines changed

pythonforandroid/bootstraps/common/build/build.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ def parse_args(args=None):
538538
ap.add_argument('--icon', dest='icon',
539539
help=('A png file to use as the icon for '
540540
'the application.'))
541+
ap.add_argument('--service', dest='services', action='append',
542+
help='Declare a new service entrypoint: '
543+
'NAME:PATH_TO_PY[:foreground]')
541544
if get_bootstrap_name() != "service_only":
542545
ap.add_argument('--presplash', dest='presplash',
543546
help=('A jpeg file to use as a screen while the '
@@ -566,10 +569,6 @@ def parse_args(args=None):
566569
'https://developer.android.com/guide/'
567570
'topics/manifest/'
568571
'activity-element.html'))
569-
else:
570-
ap.add_argument('--service', dest='services', action='append',
571-
help='Declare a new service entrypoint: '
572-
'NAME:PATH_TO_PY[:foreground]')
573572
ap.add_argument('--wakelock', dest='wakelock', action='store_true',
574573
help=('Indicate if the application needs the device '
575574
'to stay on'))
@@ -689,7 +688,7 @@ def _read_configuration():
689688
if args.meta_data is None:
690689
args.meta_data = []
691690

692-
if getattr(args, 'services', None) is None:
691+
if args.services is None:
693692
args.services = []
694693

695694
if args.try_system_python_compile:

0 commit comments

Comments
 (0)